static PyObject *long_lshift(PyObject *v, PyObject *w){ /* This version due to Tim Peters */ PyLongObject *a, *b; PyLongObject *z = NULL; long shiftby; Py_ssize_t oldsize, newsize, wordshift, remshift, i, j; twodigits accum; CONVERT_BINOP(v, w, &a, &b); shiftby = PyLong_AsLong((PyObject *)b); if (shiftby == -1L && PyErr_Occurred()) goto lshift_error; if (shiftby < 0) { PyErr_SetString(PyExc_ValueError, "negative shift count"); goto lshift_error; } if ((long)(int)shiftby != shiftby) { PyErr_SetString(PyExc_ValueError, "outrageous left shift count"); goto lshift_error; } /* wordshift, remshift = divmod(shiftby, SHIFT) */ wordshift = (int)shiftby / SHIFT; remshift = (int)shiftby - wordshift * SHIFT; oldsize = ABS(a->ob_size); newsize = oldsize + wordshift; if (remshift) ++newsize; z = _PyLong_New(newsize); if (z == NULL) goto lshift_error; if (a->ob_size < 0) z->ob_size = -(z->ob_size); for (i = 0; i < wordshift; i++) z->ob_digit[i] = 0; accum = 0; for (i = wordshift, j = 0; j < oldsize; i++, j++) { accum |= (twodigits)a->ob_digit[j] << remshift; z->ob_digit[i] = (digit)(accum & MASK); accum >>= SHIFT; } if (remshift) z->ob_digit[newsize-1] = (digit)accum; else assert(!accum); z = long_normalize(z);lshift_error: Py_DECREF(a); Py_DECREF(b); return (PyObject *) z;} /* Bitwise and/xor/or operations */ static PyObject *long_bitwise(PyLongObject *a, int op, /* '&', '|', '^' */ PyLongObject *b){ digit maska, maskb; /* 0 or MASK */ int negz; Py_ssize_t size_a, size_b, size_z; PyLongObject *z; int i; digit diga, digb; PyObject *v; if (a->ob_size < 0) { a = (PyLongObject *) long_invert(a); if (a == NULL) return NULL; maska = MASK; } else { Py_INCREF(a); maska = 0; } if (b->ob_size < 0) { b = (PyLongObject *) long_invert(b); if (b == NULL) { Py_DECREF(a); return NULL; } maskb = MASK; } else { Py_INCREF(b); maskb = 0; } negz = 0; switch (op) { case '^': if (maska != maskb) { maska ^= MASK; negz = -1; } break; case '&': if (maska && maskb) { op = '|'; maska ^= MASK; maskb ^= MASK; negz = -1; } break; case '|': if (maska || maskb) { op = '&'; maska ^= MASK; maskb ^= MASK; negz = -1; } break; } /* JRH: The original logic here was to allocate the result value (z) as the longer of the two operands. However, there are some cases where the result is guaranteed to be shorter than that: AND of two positives, OR of two negatives: use the shorter number. AND with mixed signs: use the positive number. OR with mixed signs: use the negative number. After the transformations above, op will be '&' iff one of these cases applies, and mask will be non-0 for operands whose length should be ignored. */ size_a = a->ob_size; size_b = b->ob_size; size_z = op == '&' ? (maska ? size_b : (maskb ? size_a : MIN(size_a, size_b))) : MAX(size_a, size_b); z = _PyLong_New(size_z); if (z == NULL) { Py_DECREF(a); Py_DECREF(b); return NULL; } for (i = 0; i < size_z; ++i) { diga = (i < size_a ? a->ob_digit[i] : 0) ^ maska; digb = (i < size_b ? b->ob_digit[i] : 0) ^ maskb; switch (op) { case '&': z->ob_digit[i] = diga & digb; break; case '|': z->ob_digit[i] = diga | digb; break; case '^': z->ob_digit[i] = diga ^ digb; break; } } Py_DECREF(a); Py_DECREF(b); z = long_normalize(z); if (negz == 0) return (PyObject *) z; v = long_invert(z); Py_DECREF(z); return v;} static PyObject *long_and(PyObject *v, PyObject *w){ PyLongObject *a, *b; PyObject *c; CONVERT_BINOP(v, w, &a, &b); c = long_bitwise(a, '&', b); Py_DECREF(a); Py_DECREF(b); return c;} static PyObject *long_xor(PyObject *v, PyObject *w){ PyLongObject *a, *b; PyObject *c; CONVERT_BINOP(v, w, &a, &b); c = long_bitwise(a, '^', b); Py_DECREF(a); Py_DECREF(b); return c;} static PyObject *long_or(PyObject *v, PyObject *w){ PyLongObject *a, *b; PyObject *c; CONVERT_BINOP(v, w, &a, &b); c = long_bitwise(a, '|', b); Py_DECREF(a); Py_DECREF(b); return c;} static intlong_coerce(PyObject **pv, PyObject **pw){ if (PyInt_Check(*pw)) { *pw = PyLong_FromLong(PyInt_AS_LONG(*pw)); Py_INCREF(*pv); return 0; } else if (PyLong_Check(*pw)) { Py_INCREF(*pv); Py_INCREF(*pw); return 0; } return 1; /* Can't do it */} static PyObject *long_long(PyObject *v){ if (PyLong_CheckExact(v)) Py_INCREF(v); else v = _PyLong_Copy((PyLongObject *)v); return v;} static PyObject *long_int(PyObject *v){ long x; x = PyLong_AsLong(v); if (PyErr_Occurred()) { if (PyErr_ExceptionMatches(PyExc_OverflowError)) { PyErr_Clear(); if (PyLong_CheckExact(v)) { Py_INCREF(v); return v; } else return _PyLong_Copy((PyLongObject *)v); } else return NULL; } return PyInt_FromLong(x);} static PyObject *long_float(PyObject *v){ double result; result = PyLong_AsDouble(v); if (result == -1.0 && PyErr_Occurred()) return NULL; return PyFloat_FromDouble(result);} static PyObject *long_oct(PyObject *v){ return long_format(v, 8, 1);} static PyObject *long_hex(PyObject *v){ return long_format(v, 16, 1);} static PyObject *long_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds); static PyObject *long_new(PyTypeObject *type, PyObject *args, PyObject *kwds){ PyObject *x = NULL; int base = -909; /* unlikely! */ static char *kwlist[] = {"x", "base", 0}; if (type != &PyLong_Type) return long_subtype_new(type, args, kwds); /* Wimp out */ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|Oi:long", kwlist, &x, &base)) return NULL; if (x == NULL) return PyLong_FromLong(0L); if (base == -909) return PyNumber_Long(x); else if (PyString_Check(x)) { /* Since PyLong_FromString doesn't have a length parameter, * check here for possible NULs in the string. */ char *string = PyString_AS_STRING(x); if (strlen(string) != PyString_Size(x)) { /* create a repr() of the input string, * just like PyLong_FromString does. */ PyObject *srepr; srepr = PyObject_Repr(x); if (srepr == NULL) return NULL; PyErr_Format(PyExc_ValueError, "invalid literal for long() with base %d: %s", base, PyString_AS_STRING(srepr)); Py_DECREF(srepr); return NULL; } return PyLong_FromString(PyString_AS_STRING(x), NULL, base); }#ifdef Py_USING_UNICODE else if (PyUnicode_Check(x)) return PyLong_FromUnicode(PyUnicode_AS_UNICODE(x), PyUnicode_GET_SIZE(x), base);#endif else { PyErr_SetString(PyExc_TypeError, "long() can't convert non-string with explicit base"); return NULL; }} /* Wimpy, slow approach to tp_new calls for subtypes of long: first create a regular long from whatever arguments we got, then allocate a subtype instance and initialize it from the regular long. The regular long is then thrown away.*/static PyObject *long_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds){ PyLongObject *tmp, *newobj; Py_ssize_t i, n; assert(PyType_IsSubtype(type, &PyLong_Type)); tmp = (PyLongObject *)long_new(&PyLong_Type, args, kwds); if (tmp == NULL) return NULL; assert(PyLong_CheckExact(tmp)); n = tmp->ob_size; if (n < 0) n = -n; newobj = (PyLongObject *)type->tp_alloc(type, n); if (newobj == NULL) { Py_DECREF(tmp); return NULL; } assert(PyLong_Check(newobj)); newobj->ob_size = tmp->ob_size; for (i = 0; i < n; i++) newobj->ob_digit[i] = tmp->ob_digit[i]; Py_DECREF(tmp); return (PyObject *)newobj;} static PyObject *long_getnewargs(PyLongObject *v){ return Py_BuildValue("(N)", _PyLong_Copy(v));} static PyMethodDef long_methods[] = { {"__getnewargs__", (PyCFunction)long_getnewargs, METH_NOARGS}, {NULL, NULL} /* sentinel */}; PyDoc_STRVAR(long_doc,"long(x[, base]) -> integer\n\\n\Convert a string or number to a long integer, if possible. A floating\n\point argument will be truncated towards zero (this does not include a\n\string representation of a floating point number!) When converting a\n\string, use the optional base. It is an error to supply a base when\n\converting a non-string."); static PyNumberMethods long_as_number = { (binaryfunc) long_add, /*nb_add*/ (binaryfunc) long_sub, /*nb_subtract*/ (binaryfunc) long_mul, /*nb_multiply*/ long_classic_div, /*nb_divide*/ long_mod, /*nb_remainder*/ long_divmod, /*nb_divmod*/ long_pow, /*nb_power*/ (unaryfunc) long_neg, /*nb_negative*/ (unaryfunc) long_pos, /*tp_positive*/ (unaryfunc) long_abs, /*tp_absolute*/ (inquiry) long_nonzero, /*tp_nonzero*/ (unaryfunc) long_invert, /*nb_invert*/ long_lshift, /*nb_lshift*/ (binaryfunc) long_rshift, /*nb_rshift*/ long_and, /*nb_and*/ long_xor, /*nb_xor*/ long_or, /*nb_or*/ long_coerce, /*nb_coerce*/ long_int, /*nb_int*/ long_long, /*nb_long*/ long_float, /*nb_float*/ long_oct, /*nb_oct*/ long_hex, /*nb_hex*/ 0, /* nb_inplace_add */ 0, /* nb_inplace_subtract */ 0, /* nb_inplace_multiply */ 0, /* nb_inplace_divide */ 0, /* nb_inplace_remainder */ 0, /* nb_inplace_power */ 0, /* nb_inplace_lshift */ 0, /* nb_inplace_rshift */ 0, /* nb_inplace_and */ 0, /* nb_inplace_xor */ 0, /* nb_inplace_or */ long_div, /* nb_floor_divide */ long_true_divide, /* nb_true_divide */ 0, /* nb_inplace_floor_divide */ 0, /* nb_inplace_true_divide */ long_long, /* nb_index */}; PyTypeObject PyLong_Type = { PyObject_HEAD_INIT(&PyType_Type) 0, /* ob_size */ "long", /* tp_name */ sizeof(PyLongObject) - sizeof(digit), /* tp_basicsize */ sizeof(digit), /* tp_itemsize */ long_dealloc, /* tp_dealloc */ 0, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ (cmpfunc)long_compare, /* tp_compare */ long_repr, /* tp_repr */ &long_as_number, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)long_hash, /* tp_hash */ 0, /* tp_call */ long_str, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES | Py_TPFLAGS_BASETYPE, /* tp_flags */ long_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ long_methods, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ long_new, /* tp_new */ PyObject_Del, /* tp_free */};Lines 3001–3458 of 3458. Previous lines
static PyObject * long_lshift(PyObject *v, PyObject *w) { /* This version due to Tim Peters */ PyLongObject *a, *b; PyLongObject *z = NULL; long shiftby; Py_ssize_t oldsize, newsize, wordshift, remshift, i, j; twodigits accum; CONVERT_BINOP(v, w, &a, &b); shiftby = PyLong_AsLong((PyObject *)b); if (shiftby == -1L && PyErr_Occurred()) goto lshift_error; if (shiftby < 0) { PyErr_SetString(PyExc_ValueError, "negative shift count"); goto lshift_error; } if ((long)(int)shiftby != shiftby) { PyErr_SetString(PyExc_ValueError, "outrageous left shift count"); goto lshift_error; } /* wordshift, remshift = divmod(shiftby, SHIFT) */ wordshift = (int)shiftby / SHIFT; remshift = (int)shiftby - wordshift * SHIFT; oldsize = ABS(a->ob_size); newsize = oldsize + wordshift; if (remshift) ++newsize; z = _PyLong_New(newsize); if (z == NULL) goto lshift_error; if (a->ob_size < 0) z->ob_size = -(z->ob_size); for (i = 0; i < wordshift; i++) z->ob_digit[i] = 0; accum = 0; for (i = wordshift, j = 0; j < oldsize; i++, j++) { accum |= (twodigits)a->ob_digit[j] << remshift; z->ob_digit[i] = (digit)(accum & MASK); accum >>= SHIFT; } if (remshift) z->ob_digit[newsize-1] = (digit)accum; else assert(!accum); z = long_normalize(z); lshift_error: Py_DECREF(a); Py_DECREF(b); return (PyObject *) z; } /* Bitwise and/xor/or operations */ static PyObject * long_bitwise(PyLongObject *a, int op, /* '&', '|', '^' */ PyLongObject *b) { digit maska, maskb; /* 0 or MASK */ int negz; Py_ssize_t size_a, size_b, size_z; PyLongObject *z; int i; digit diga, digb; PyObject *v; if (a->ob_size < 0) { a = (PyLongObject *) long_invert(a); if (a == NULL) return NULL; maska = MASK; } else { Py_INCREF(a); maska = 0; } if (b->ob_size < 0) { b = (PyLongObject *) long_invert(b); if (b == NULL) { Py_DECREF(a); return NULL; } maskb = MASK; } else { Py_INCREF(b); maskb = 0; } negz = 0; switch (op) { case '^': if (maska != maskb) { maska ^= MASK; negz = -1; } break; case '&': if (maska && maskb) { op = '|'; maska ^= MASK; maskb ^= MASK; negz = -1; } break; case '|': if (maska || maskb) { op = '&'; maska ^= MASK; maskb ^= MASK; negz = -1; } break; } /* JRH: The original logic here was to allocate the result value (z) as the longer of the two operands. However, there are some cases where the result is guaranteed to be shorter than that: AND of two positives, OR of two negatives: use the shorter number. AND with mixed signs: use the positive number. OR with mixed signs: use the negative number. After the transformations above, op will be '&' iff one of these cases applies, and mask will be non-0 for operands whose length should be ignored. */ size_a = a->ob_size; size_b = b->ob_size; size_z = op == '&' ? (maska ? size_b : (maskb ? size_a : MIN(size_a, size_b))) : MAX(size_a, size_b); z = _PyLong_New(size_z); if (z == NULL) { Py_DECREF(a); Py_DECREF(b); return NULL; } for (i = 0; i < size_z; ++i) { diga = (i < size_a ? a->ob_digit[i] : 0) ^ maska; digb = (i < size_b ? b->ob_digit[i] : 0) ^ maskb; switch (op) { case '&': z->ob_digit[i] = diga & digb; break; case '|': z->ob_digit[i] = diga | digb; break; case '^': z->ob_digit[i] = diga ^ digb; break; } } Py_DECREF(a); Py_DECREF(b); z = long_normalize(z); if (negz == 0) return (PyObject *) z; v = long_invert(z); Py_DECREF(z); return v; } static PyObject * long_and(PyObject *v, PyObject *w) { PyLongObject *a, *b; PyObject *c; CONVERT_BINOP(v, w, &a, &b); c = long_bitwise(a, '&', b); Py_DECREF(a); Py_DECREF(b); return c; } static PyObject * long_xor(PyObject *v, PyObject *w) { PyLongObject *a, *b; PyObject *c; CONVERT_BINOP(v, w, &a, &b); c = long_bitwise(a, '^', b); Py_DECREF(a); Py_DECREF(b); return c; } static PyObject * long_or(PyObject *v, PyObject *w) { PyLongObject *a, *b; PyObject *c; CONVERT_BINOP(v, w, &a, &b); c = long_bitwise(a, '|', b); Py_DECREF(a); Py_DECREF(b); return c; } static int long_coerce(PyObject **pv, PyObject **pw) { if (PyInt_Check(*pw)) { *pw = PyLong_FromLong(PyInt_AS_LONG(*pw)); Py_INCREF(*pv); return 0; } else if (PyLong_Check(*pw)) { Py_INCREF(*pv); Py_INCREF(*pw); return 0; } return 1; /* Can't do it */ } static PyObject * long_long(PyObject *v) { if (PyLong_CheckExact(v)) Py_INCREF(v); else v = _PyLong_Copy((PyLongObject *)v); return v; } static PyObject * long_int(PyObject *v) { long x; x = PyLong_AsLong(v); if (PyErr_Occurred()) { if (PyErr_ExceptionMatches(PyExc_OverflowError)) { PyErr_Clear(); if (PyLong_CheckExact(v)) { Py_INCREF(v); return v; } else return _PyLong_Copy((PyLongObject *)v); } else return NULL; } return PyInt_FromLong(x); } static PyObject * long_float(PyObject *v) { double result; result = PyLong_AsDouble(v); if (result == -1.0 && PyErr_Occurred()) return NULL; return PyFloat_FromDouble(result); } static PyObject * long_oct(PyObject *v) { return long_format(v, 8, 1); } static PyObject * long_hex(PyObject *v) { return long_format(v, 16, 1); } static PyObject * long_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds); static PyObject * long_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PyObject *x = NULL; int base = -909; /* unlikely! */ static char *kwlist[] = {"x", "base", 0}; if (type != &PyLong_Type) return long_subtype_new(type, args, kwds); /* Wimp out */ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|Oi:long", kwlist, &x, &base)) return NULL; if (x == NULL) return PyLong_FromLong(0L); if (base == -909) return PyNumber_Long(x); else if (PyString_Check(x)) { /* Since PyLong_FromString doesn't have a length parameter, * check here for possible NULs in the string. */ char *string = PyString_AS_STRING(x); if (strlen(string) != PyString_Size(x)) { /* create a repr() of the input string, * just like PyLong_FromString does. */ PyObject *srepr; srepr = PyObject_Repr(x); if (srepr == NULL) return NULL; PyErr_Format(PyExc_ValueError, "invalid literal for long() with base %d: %s", base, PyString_AS_STRING(srepr)); Py_DECREF(srepr); return NULL; } return PyLong_FromString(PyString_AS_STRING(x), NULL, base); } #ifdef Py_USING_UNICODE else if (PyUnicode_Check(x)) return PyLong_FromUnicode(PyUnicode_AS_UNICODE(x), PyUnicode_GET_SIZE(x), base); #endif else { PyErr_SetString(PyExc_TypeError, "long() can't convert non-string with explicit base"); return NULL; } } /* Wimpy, slow approach to tp_new calls for subtypes of long: first create a regular long from whatever arguments we got, then allocate a subtype instance and initialize it from the regular long. The regular long is then thrown away. */ static PyObject * long_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PyLongObject *tmp, *newobj; Py_ssize_t i, n; assert(PyType_IsSubtype(type, &PyLong_Type)); tmp = (PyLongObject *)long_new(&PyLong_Type, args, kwds); if (tmp == NULL) return NULL; assert(PyLong_CheckExact(tmp)); n = tmp->ob_size; if (n < 0) n = -n; newobj = (PyLongObject *)type->tp_alloc(type, n); if (newobj == NULL) { Py_DECREF(tmp); return NULL; } assert(PyLong_Check(newobj)); newobj->ob_size = tmp->ob_size; for (i = 0; i < n; i++) newobj->ob_digit[i] = tmp->ob_digit[i]; Py_DECREF(tmp); return (PyObject *)newobj; } static PyObject * long_getnewargs(PyLongObject *v) { return Py_BuildValue("(N)", _PyLong_Copy(v)); } static PyMethodDef long_methods[] = { {"__getnewargs__", (PyCFunction)long_getnewargs, METH_NOARGS}, {NULL, NULL} /* sentinel */ }; PyDoc_STRVAR(long_doc, "long(x[, base]) -> integer\n\ \n\ Convert a string or number to a long integer, if possible. A floating\n\ point argument will be truncated towards zero (this does not include a\n\ string representation of a floating point number!) When converting a\n\ string, use the optional base. It is an error to supply a base when\n\ converting a non-string."); static PyNumberMethods long_as_number = { (binaryfunc) long_add, /*nb_add*/ (binaryfunc) long_sub, /*nb_subtract*/ (binaryfunc) long_mul, /*nb_multiply*/ long_classic_div, /*nb_divide*/ long_mod, /*nb_remainder*/ long_divmod, /*nb_divmod*/ long_pow, /*nb_power*/ (unaryfunc) long_neg, /*nb_negative*/ (unaryfunc) long_pos, /*tp_positive*/ (unaryfunc) long_abs, /*tp_absolute*/ (inquiry) long_nonzero, /*tp_nonzero*/ (unaryfunc) long_invert, /*nb_invert*/ long_lshift, /*nb_lshift*/ (binaryfunc) long_rshift, /*nb_rshift*/ long_and, /*nb_and*/ long_xor, /*nb_xor*/ long_or, /*nb_or*/ long_coerce, /*nb_coerce*/ long_int, /*nb_int*/ long_long, /*nb_long*/ long_float, /*nb_float*/ long_oct, /*nb_oct*/ long_hex, /*nb_hex*/ 0, /* nb_inplace_add */ 0, /* nb_inplace_subtract */ 0, /* nb_inplace_multiply */ 0, /* nb_inplace_divide */ 0, /* nb_inplace_remainder */ 0, /* nb_inplace_power */ 0, /* nb_inplace_lshift */ 0, /* nb_inplace_rshift */ 0, /* nb_inplace_and */ 0, /* nb_inplace_xor */ 0, /* nb_inplace_or */ long_div, /* nb_floor_divide */ long_true_divide, /* nb_true_divide */ 0, /* nb_inplace_floor_divide */ 0, /* nb_inplace_true_divide */ long_long, /* nb_index */ }; PyTypeObject PyLong_Type = { PyObject_HEAD_INIT(&PyType_Type) 0, /* ob_size */ "long", /* tp_name */ sizeof(PyLongObject) - sizeof(digit), /* tp_basicsize */ sizeof(digit), /* tp_itemsize */ long_dealloc, /* tp_dealloc */ 0, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ (cmpfunc)long_compare, /* tp_compare */ long_repr, /* tp_repr */ &long_as_number, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)long_hash, /* tp_hash */ 0, /* tp_call */ long_str, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES | Py_TPFLAGS_BASETYPE, /* tp_flags */ long_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ long_methods, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ long_new, /* tp_new */ PyObject_Del, /* tp_free */ };