comparison Python/sysmodule.c @ 48477:e26c724d5e23

Make these files to compile again under Windows.
author Thomas Heller <theller@ctypes.org>
date Tue, 15 Jul 2008 17:14:51 +0000
parents 3d868254ff7e
children de0bf60f1245
comparison
equal deleted inserted replaced
48476:f8723eb105ac 48477:e26c724d5e23
614 { 614 {
615 PyObject *res = NULL; 615 PyObject *res = NULL;
616 static PyObject *str__sizeof__, *gc_head_size = NULL; 616 static PyObject *str__sizeof__, *gc_head_size = NULL;
617 static char *kwlist[] = {"object", "default", 0}; 617 static char *kwlist[] = {"object", "default", 0};
618 PyObject *o, *dflt = NULL; 618 PyObject *o, *dflt = NULL;
619 PyObject *method;
619 620
620 if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|O:getsizeof", 621 if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|O:getsizeof",
621 kwlist, &o, &dflt)) 622 kwlist, &o, &dflt))
622 return NULL; 623 return NULL;
623 624
637 638
638 /* Make sure the type is initialized. float gets initialized late */ 639 /* Make sure the type is initialized. float gets initialized late */
639 if (PyType_Ready(Py_TYPE(o)) < 0) 640 if (PyType_Ready(Py_TYPE(o)) < 0)
640 return NULL; 641 return NULL;
641 642
642 PyObject *method = _PyType_Lookup(Py_TYPE(o), str__sizeof__); 643 method = _PyType_Lookup(Py_TYPE(o), str__sizeof__);
643 if (method == NULL) 644 if (method == NULL)
644 PyErr_Format(PyExc_TypeError, 645 PyErr_Format(PyExc_TypeError,
645 "Type %.100s doesn't define __sizeof__", 646 "Type %.100s doesn't define __sizeof__",
646 Py_TYPE(o)->tp_name); 647 Py_TYPE(o)->tp_name);
647 else 648 else