-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Description
When calling some curses C functions, we ignore their return values. Those are:
-
in
PyCursesWindow_dealloc, we ignoredelwin()errors -
in
_curses_initscr_impl, we ignorewrefresh()errors -
in
_curses_window_addstr_impl, we ignorewattrset()errors and prefer reporting errors due to adding strings. Same for theinsstr*functions -
in
_curses_window_box_impl, we ignore the error returned bybox(). This is correct because the manual says (forbox):All routines return the integer OK. The SVr4.0 manual says "or a non-negative integer if immedok is set", but this appears to be an error. X/Open does not define any error conditions. This implementation returns an error if the window pointer is null.
In this case, I think it's better to explicitly suppress the return value and link the manpage.
The question now is:
- What should we do for a failing
delwin()in the destructor? - What should we do for
wattrset()when this routine is not the "important" one?
cc @encukou
Note
We will not backport these fixes as they could break existing code that could be surprised by a new exception.
Linked PRs
Metadata
Metadata
Assignees
Labels
Projects
Status