Lines Matching refs:ival

49 get_small_int(sdigit ival)  in get_small_int()  argument
52 assert(-NSMALLNEGINTS <= ival && ival < NSMALLPOSINTS); in get_small_int()
53 v = (PyObject *)&small_ints[ival + NSMALLNEGINTS]; in get_small_int()
56 if (ival >= 0) in get_small_int()
63 #define CHECK_SMALL_INT(ival) \ argument
64 do if (-NSMALLNEGINTS <= ival && ival < NSMALLPOSINTS) { \
65 return get_small_int((sdigit)ival); \
72 sdigit ival = MEDIUM_VALUE(v); in maybe_small_long() local
73 if (-NSMALLNEGINTS <= ival && ival < NSMALLPOSINTS) { in maybe_small_long()
75 return (PyLongObject *)get_small_int(ival); in maybe_small_long()
81 #define CHECK_SMALL_INT(ival) argument
228 sdigit ival = MEDIUM_VALUE(src); in _PyLong_Copy() local
229 CHECK_SMALL_INT(ival); in _PyLong_Copy()
243 PyLong_FromLong(long ival) in PyLong_FromLong() argument
251 CHECK_SMALL_INT(ival); in PyLong_FromLong()
253 if (ival < 0) { in PyLong_FromLong()
256 abs_ival = 0U-(unsigned long)ival; in PyLong_FromLong()
260 abs_ival = (unsigned long)ival; in PyLong_FromLong()
261 sign = ival == 0 ? 0 : 1; in PyLong_FromLong()
313 PyLong_FromUnsignedLong(unsigned long ival) in PyLong_FromUnsignedLong() argument
319 if (ival < PyLong_BASE) in PyLong_FromUnsignedLong()
320 return PyLong_FromLong(ival); in PyLong_FromUnsignedLong()
322 t = ival; in PyLong_FromUnsignedLong()
330 while (ival) { in PyLong_FromUnsignedLong()
331 *p++ = (digit)(ival & PyLong_MASK); in PyLong_FromUnsignedLong()
332 ival >>= PyLong_SHIFT; in PyLong_FromUnsignedLong()
1074 PyLong_FromLongLong(long long ival) in PyLong_FromLongLong() argument
1082 CHECK_SMALL_INT(ival); in PyLong_FromLongLong()
1083 if (ival < 0) { in PyLong_FromLongLong()
1086 abs_ival = (unsigned long long)(-1-ival) + 1; in PyLong_FromLongLong()
1090 abs_ival = (unsigned long long)ival; in PyLong_FromLongLong()
1118 PyLong_FromUnsignedLongLong(unsigned long long ival) in PyLong_FromUnsignedLongLong() argument
1124 if (ival < PyLong_BASE) in PyLong_FromUnsignedLongLong()
1125 return PyLong_FromLong((long)ival); in PyLong_FromUnsignedLongLong()
1127 t = ival; in PyLong_FromUnsignedLongLong()
1135 while (ival) { in PyLong_FromUnsignedLongLong()
1136 *p++ = (digit)(ival & PyLong_MASK); in PyLong_FromUnsignedLongLong()
1137 ival >>= PyLong_SHIFT; in PyLong_FromUnsignedLongLong()
1146 PyLong_FromSsize_t(Py_ssize_t ival) in PyLong_FromSsize_t() argument
1154 CHECK_SMALL_INT(ival); in PyLong_FromSsize_t()
1155 if (ival < 0) { in PyLong_FromSsize_t()
1157 abs_ival = (size_t)(-1-ival)+1; in PyLong_FromSsize_t()
1161 abs_ival = (size_t)ival; in PyLong_FromSsize_t()
1186 PyLong_FromSize_t(size_t ival) in PyLong_FromSize_t() argument
1192 if (ival < PyLong_BASE) in PyLong_FromSize_t()
1193 return PyLong_FromLong((long)ival); in PyLong_FromSize_t()
1195 t = ival; in PyLong_FromSize_t()
1204 while (ival) { in PyLong_FromSize_t()
1205 *p++ = (digit)(ival & PyLong_MASK); in PyLong_FromSize_t()
1206 ival >>= PyLong_SHIFT; in PyLong_FromSize_t()
5466 int ival, size; in _PyLong_Init() local
5469 for (ival = -NSMALLNEGINTS; ival < NSMALLPOSINTS; ival++, v++) { in _PyLong_Init()
5470 size = (ival < 0) ? -1 : ((ival == 0) ? 0 : 1); in _PyLong_Init()
5485 assert(v->ob_digit[0] == (digit)abs(ival)); in _PyLong_Init()
5491 v->ob_digit[0] = (digit)abs(ival); in _PyLong_Init()