Skip to content

How to continue normal processing when using errcheck protocol in ctypes #112423

Closed

Description

@butscher

Documentation

At https://docs.python.org/3/library/ctypes.html#ctypes._FuncPtr.errcheck there isn't explained what to return to continue with normal processing of the foreign function result (parameter(s) flagged as input/output or output parameters are returned instead of the actual ffi result value).

It should be added that returning the arguments parameter, the usual processing continues.

See code comment:

    /* If the errcheck function failed, return NULL.
       If the errcheck function returned callargs unchanged,
       continue normal processing.
       If the errcheck function returned something else,
       use that as result.
    */

Linked PRs

Activity

  1. added
    docs
    on Nov 26, 2023
  2. added a commit that references this issue on Oct 19, 2026
  3. added 2 commits that reference this issue on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docstopic-ctypes

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions