8000 Add PyLong_Sign() public function · Issue #19 · capi-workgroup/decisions · GitHub
[go: up one dir, main page]

Skip to content
Add PyLong_Sign() public function #19
@vstinner

Description

@vstinner

API: int PyLong_Sign(PyObject *obj, int *sign)

Retrieve the sign of integer object obj (0, -1 or +1 for zero,
negative or positive integer, respectively) in a variable sign.

Return 0 on success, else -1 with an exception set. This function
always succeeds if obj is a :c:type:PyLongObject or its subtype.

PR: python/cpython#116561


I would like to propose adding the API directly to the limited API, what do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0