MCPcopy Create free account
hub / github.com/numpy/numpy / PyInt_Check

Function PyInt_Check

numpy/core/include/numpy/npy_3kcompat.h:59–66  ·  view source on GitHub ↗

Return True only if the long fits in a C long */

Source from the content-addressed store, hash-verified

57#if defined(NPY_PY3K)
58/* Return True only if the long fits in a C long */
59static inline int PyInt_Check(PyObject *op) {
60 int overflow = 0;
61 if (!PyLong_Check(op)) {
62 return 0;
63 }
64 PyLong_AsLongAndOverflow(op, &overflow);
65 return (overflow == 0);
66}
67
68
69#define PyInt_FromLong PyLong_FromLong

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected