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

Function PyLong_IsPositive

asyncpg/protocol/record/pythoncapi_compat.h:1544–1551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1542// gh-126061 added PyLong_IsPositive/Negative/Zero() to Python in 3.14.0a2
1543#if PY_VERSION_HEX < 0x030E00A2
1544static inline int PyLong_IsPositive(PyObject *obj)
1545{
1546 if (!PyLong_Check(obj)) {
1547 PyErr_Format(PyExc_TypeError, "expected int, got %s", Py_TYPE(obj)->tp_name);
1548 return -1;
1549 }
1550 return _PyLong_Sign(obj) == 1;
1551}
1552
1553static inline int PyLong_IsNegative(PyObject *obj)
1554{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected