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

Function PyLong_IsNegative

asyncpg/protocol/record/pythoncapi_compat.h:1553–1560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1551}
1552
1553static inline int PyLong_IsNegative(PyObject *obj)
1554{
1555 if (!PyLong_Check(obj)) {
1556 PyErr_Format(PyExc_TypeError, "expected int, got %s", Py_TYPE(obj)->tp_name);
1557 return -1;
1558 }
1559 return _PyLong_Sign(obj) == -1;
1560}
1561
1562static inline int PyLong_IsZero(PyObject *obj)
1563{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected