mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Make these files to compile again under Windows.
This commit is contained in:
parent
0d755b4e2b
commit
d88ddfa94a
2 changed files with 5 additions and 3 deletions
|
@ -616,6 +616,7 @@ sys_getsizeof(PyObject *self, PyObject *args, PyObject *kwds)
|
|||
static PyObject *str__sizeof__, *gc_head_size = NULL;
|
||||
static char *kwlist[] = {"object", "default", 0};
|
||||
PyObject *o, *dflt = NULL;
|
||||
PyObject *method;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|O:getsizeof",
|
||||
kwlist, &o, &dflt))
|
||||
|
@ -639,7 +640,7 @@ sys_getsizeof(PyObject *self, PyObject *args, PyObject *kwds)
|
|||
if (PyType_Ready(Py_TYPE(o)) < 0)
|
||||
return NULL;
|
||||
|
||||
PyObject *method = _PyType_Lookup(Py_TYPE(o), str__sizeof__);
|
||||
method = _PyType_Lookup(Py_TYPE(o), str__sizeof__);
|
||||
if (method == NULL)
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"Type %.100s doesn't define __sizeof__",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue