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

Exact reporting ofcurses C function failures #133579

Open
Assignees
picnixz
Labels
extension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error
@picnixz

Description

@picnixz

When calling some curses C functions, we ignore their return values. Those are:

  • inPyCursesWindow_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 failingdelwin() in the destructor?
  • What should we do forwattrset() 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

extension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp