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

Function PyLong_AsInt32

asyncpg/protocol/record/pythoncapi_compat.h:1689–1698  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1687}
1688
1689static inline int PyLong_AsInt32(PyObject *obj, int32_t *pvalue)
1690{
1691 Py_BUILD_ASSERT(sizeof(int) == 4);
1692 int value = PyLong_AsInt(obj);
1693 if (value == -1 && PyErr_Occurred()) {
1694 return -1;
1695 }
1696 *pvalue = (int32_t)value;
1697 return 0;
1698}
1699
1700static inline int PyLong_AsInt64(PyObject *obj, int64_t *pvalue)
1701{

Callers

nothing calls this directly

Calls 1

PyLong_AsIntFunction · 0.85

Tested by

no test coverage detected