MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / PyLong_GetSign

Function PyLong_GetSign

asyncpg/protocol/record/pythoncapi_compat.h:1530–1539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1528// gh-116560 added PyLong_GetSign() to Python 3.14.0a0
1529#if PY_VERSION_HEX < 0x030E00A0
1530static inline int PyLong_GetSign(PyObject *obj, int *sign)
1531{
1532 if (!PyLong_Check(obj)) {
1533 PyErr_Format(PyExc_TypeError, "expect int, got %s", Py_TYPE(obj)->tp_name);
1534 return -1;
1535 }
1536
1537 *sign = _PyLong_Sign(obj);
1538 return 0;
1539}
1540#endif
1541
1542// gh-126061 added PyLong_IsPositive/Negative/Zero() to Python in 3.14.0a2

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected