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

Function PyLong_AsUInt64

asyncpg/protocol/record/pythoncapi_compat.h:1729–1738  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1727}
1728
1729static inline int PyLong_AsUInt64(PyObject *obj, uint64_t *pvalue)
1730{
1731 Py_BUILD_ASSERT(sizeof(long long) == 8);
1732 unsigned long long value = PyLong_AsUnsignedLongLong(obj);
1733 if (value == (unsigned long long)-1 && PyErr_Occurred()) {
1734 return -1;
1735 }
1736 *pvalue = (uint64_t)value;
1737 return 0;
1738}
1739#endif
1740
1741

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected