Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-125843: indicate which C function caused acurses.error#125844

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
picnixz merged 27 commits intopython:mainfrompicnixz:curses/improve-error-type-125843
May 19, 2025
Merged
Changes from1 commit
Commits
Show all changes
27 commits
Select commitHold shift + click to select a range
03fc9c5
improve `curses.error` object
picnixzOct 15, 2024
3436f9b
update error messages
picnixzOct 15, 2024
73ce26c
cosmetic changes!
picnixzOct 16, 2024
cfe5468
blurb
picnixzOct 22, 2024
a8845ee
update docs
picnixzOct 22, 2024
1b1230d
Merge remote-tracking branch 'upstream/main' into x-stale/feat/curses…
picnixzApr 25, 2025
55a491a
reduce diff
picnixzApr 25, 2025
758dfe5
reduce diff even futher
picnixzApr 25, 2025
3a3964b
simplify logic
picnixzApr 25, 2025
92e62cf
simplify logic x2
picnixzApr 25, 2025
4d8f47f
reduce diff again!
picnixzApr 25, 2025
5b8ff99
simplify logic x3
picnixzApr 25, 2025
43d2e99
lint
picnixzApr 25, 2025
12f0b30
reduce diff x4
picnixzApr 25, 2025
eaaad71
reduce diff x5
picnixzApr 25, 2025
b96b542
simplify even more!
picnixzApr 26, 2025
39f102f
nits(cosmetics)
picnixzApr 26, 2025
6bc9c3e
update messages
picnixzApr 27, 2025
5addb78
remove un-necessary prototypes and rearrange code
picnixzApr 27, 2025
34583e0
address review
picnixzMay 6, 2025
236bea5
update error messages in `_curses_panel`
picnixzMay 7, 2025
8188179
raise `curses.error` in `is_linetouched` instead of TypeError
picnixzMay 19, 2025
9e6c83e
Revert "update error messages in `_curses_panel`"
picnixzMay 19, 2025
3989ddd
fix typo
picnixzMay 19, 2025
bf54774
correctly check `mouseinterval` return value
picnixzMay 19, 2025
34a1c31
Merge remote-tracking branch 'upstream/main' into feat/curses/error-t…
picnixzMay 19, 2025
6be3a15
reduce overall diff
picnixzMay 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
reduce diff again!
  • Loading branch information
@picnixz
picnixz committedApr 25, 2025
commit4d8f47ffb2f4517d410eb3a8cbe194b96c0f7d6a
26 changes: 10 additions & 16 deletionsModules/_cursesmodule.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1076,7 +1076,6 @@ _curses_window_addstr_impl(PyCursesWindowObject *self, int group_left_1,
if (strtype == 0) {
return NULL;
}

if (use_attr) {
attr_old = getattrs(self->win);
(void)wattrset(self->win,attr);
Expand DownExpand Up@@ -1406,7 +1405,7 @@ _curses_window_box_impl(PyCursesWindowObject *self, int group_right_1,
return NULL;
}
}
(void)box(self->win,ch1,ch2);
(void)box(self->win,ch1,ch2);
Py_RETURN_NONE;
}

Expand DownExpand Up@@ -1504,15 +1503,14 @@ PyCursesWindow_ChgAt(PyObject *op, PyObject *args)
attr = attr & A_ATTRIBUTES;

if (use_xy) {
rtn = mvwchgat(self->win, y, x,num,attr,color,NULL);
rtn = mvwchgat(self->win,y,x,num,attr,color,NULL);
curses_funcname = "mvwchgat";
(void)touchline(self->win, y, 1);
}
else {
getyx(self->win, y, x);
rtn = wchgat(self->win, num, attr, color, NULL);
(void)touchline(self->win,y,1);
} else {
getyx(self->win,y,x);
rtn = wchgat(self->win,num,attr,color,NULL);
curses_funcname = "wchgat";
(void)touchline(self->win, y,1);
(void)touchline(self->win,y,1);
}
return PyCursesCheckERR_ForWin_From(self, rtn, "chgat", curses_funcname);
}
Expand DownExpand Up@@ -1788,7 +1786,7 @@ _curses_window_get_wch_impl(PyCursesWindowObject *self, int group_right_1,

Py_BEGIN_ALLOW_THREADS
if (!group_right_1) {
ct = wget_wch(self->win,&rtn);
ct = wget_wch(self->win ,&rtn);
}
else {
ct = mvwget_wch(self->win, y, x, &rtn);
Expand DownExpand Up@@ -3761,17 +3759,13 @@ _curses_setupterm_impl(PyObject *module, const char *term, int fd)
}

if (!curses_setupterm_called && setupterm((char *)term, fd, &err) == ERR) {
const char *s;
const char *s = "setupterm: unknown error";

if (err == 0) {
s = "setupterm: could not find terminal";
}
else if (err == -1) {
} else if (err == -1) {
s = "setupterm: could not find terminfo database";
}
else {
s = "setupterm: unknown error";
}

cursesmodule_state *state = get_cursesmodule_state(module);
PyErr_SetString(state->error, s);
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp