Lines Matching refs:size

25 /* Is this PyLong of size 1, 0 or -1? */
28 /* convert a PyLong of size 1, 0 or -1 to a C integer */
138 /* Allocate a new int object with size digits.
145 _PyLong_New(Py_ssize_t size)
148 if (size > (Py_ssize_t)MAX_LONG_DIGITS) {
155 Py_ssize_t ndigits = size ? size : 1;
157 sizeof(digit)*size. Previous incarnations of this code used
167 _PyObject_InitVar((PyVarObject*)result, &PyLong_Type, size);
1617 /* Divide long pin, w/ size digits, by non-zero digit n, storing quotient
1639 inplace_divrem1(digit *pout, digit *pin, Py_ssize_t size, digit n)
1644 while (--size >= 0) {
1646 dividend = ((twodigits)remainder << PyLong_SHIFT) | pin[size];
1650 pout[size] = quotient;
1663 const Py_ssize_t size = Py_ABS(Py_SIZE(a));
1667 z = _PyLong_New(size);
1670 *prem = inplace_divrem1(z->ob_digit, a->ob_digit, size, n);
1674 /* Remainder of long pin, w/ size digits, by non-zero digit n,
1678 inplace_rem1(digit *pin, Py_ssize_t size, digit n)
1683 while (--size >= 0)
1684 rem = ((rem << PyLong_SHIFT) | pin[size]) % n;
1695 const Py_ssize_t size = Py_ABS(Py_SIZE(a));
1699 (long)inplace_rem1(a->ob_digit, size, n)
1716 Py_ssize_t size, strlen, size_a, i, j;
1764 size = 1 + size_a + size_a / d;
1765 scratch = _PyLong_New(size);
1774 size = 0;
1777 for (j = 0; j < size; j++) {
1784 pout[size++] = hi % _PyLong_DECIMAL_BASE;
1795 if (size == 0)
1796 pout[size++] = 0;
1799 strlen = negative + 1 + (size - 1) * _PyLong_DECIMAL_SHIFT;
1801 rem = pout[size-1];
1842 /* pout[0] through pout[size-2] contribute exactly \
1844 for (i=0; i < size - 1; i++) { \
1851 /* pout[size-1]: always produce at least one decimal digit */ \
2482 /* Limit the size to avoid excessive computation attacks. */
3456 Takes an int "n" and an integer "size" representing the place to
3457 split, and sets low and high such that abs(n) == (high << size) + low,
3464 Py_ssize_t size,
3472 size_lo = Py_MIN(size_n, size);
3515 * been reduced to 3 multiplies on numbers half the size.
3681 bh has c(bsize/2) digits, and bl at most f(size/2) digits. So bh+hl has
5660 Returns size in memory, in bytes.
6111 {"bits_per_digit", "size of a digit in bits"},
6112 {"sizeof_digit", "size in bytes of the C type used to represent a digit"},