Procs
proc PyNumber_AsClampedSsize_t(pyObj: PyObject; res: var int): PyTypeErrorObject {. ...raises: [], tags: [RootEffect, WriteIOEffect], forbids: [].}
-
C: PyNumber_AsSsize_t(pyObj, NULL) clamp result if overflow
returns nil unless Py's TypeError
Source Edit proc PyNumber_AsSsize_t(pyObj: PyObject; excType: PyTypeObject; resExc: var PyBaseErrorObject): int {....raises: [], tags: [RootEffect, WriteIOEffect], forbids: [].}
-
excType may be nil, in which case overflow clamps to low/high int otherwise it must be an exception type
resExc out
CPython's defined at abstract.c
Source Edit proc PyNumber_AsSsize_t(pyObj: PyObject; res: var int): PyExceptionObject {. ...raises: [], tags: [RootEffect, WriteIOEffect], forbids: [].}
- returns nil if no error; otherwise returns TypeError or OverflowError Source Edit
Exports
-
PyLong_AsSsize_t, toFloat, toFloat, Digit, pyIntZero, newPyIntFromPtr, absToUInt, toIntOrRetOF, hash, frexp, fromStr, pyIntOne, $, pyIntObjectType, toFloat, TwoDigits, newPyInt, flipSign, SDigit, bit_count, PyLong_SHIFT, toInt, PyLong_FromString, digitPyLong_DECIMAL_BASE, floorDivNonZero, retInvIntCall, toUInt, newPyIntFromPtr, PyInt_OverflowCType, truncate, *, PyIntObject, PY_INT_MAX_STR_DIGITS_THRESHOLD, zero, format, ofExactPyIntObject, PyLong_DECIMAL_BASE, positive, divmodNonZero, toInt, newPyIntSimple, PY_INT_DEFAULT_MAX_STR_DIGITS, fromStr, numbits, PyLong_AsSize_t, fromStr, newPyInt, negate, newPyInt, abs, toSomeSignedInt, newPyInt, bit_length, fromStr, divmod, //, toUInt, ==, PyLong_AsSize_t, %, <, IntSign, +, PyLong_DECIMAL_SHIFT, format_binary, toStringCheckThreshold, newPyInt, -, ofPyIntObject, <, asLongAndOverflow, toSomeUnsignedInt, newPyInt, PyLong_AsSsize_t, setSignNegative, digitCount, newPyInt, absToUInt, -, toSomeSignedIntUnsafe, PyLongBaseSet, pyIntTen, digitBits, pow, negative, newPyIntSimple, digitPyLong_DECIMAL_BASE, shr, not, shl, frexp, toFloat, pyIntObjectType, ofPyIntObject, toFloat, negate, newPyInt, newPyIntFromPtr, newPyIntFromPtr, and, setSignNegative, newPyInt, shl, zero, xor, PyIntObject, toFloat, newPyInt, newPyInt, ofExactPyIntObject, PyLong_DECIMAL_BASE, or, positive, negative, PyLong_SHIFT, flipSign, shr, PyLong_DECIMAL_SHIFT, PyNumber_Index, PyNumber_Index, privatePyNumber_Index