[Numpy-svn] r4010 - branches/py3k/Modules

numpy-svn@scip... numpy-svn@scip...
Fri Aug 24 17:14:13 CDT 2007


Author: chris.burns
Date: 2007-08-24 17:13:32 -0500 (Fri, 24 Aug 2007)
New Revision: 4010

Modified:
   branches/py3k/Modules/_struct.c
Log:
Fix errors with assignment to undefined ob_type on PyStructObject objects.  Using Py_Type macro instead.

Modified: branches/py3k/Modules/_struct.c
===================================================================
--- branches/py3k/Modules/_struct.c	2007-08-24 21:06:49 UTC (rev 4009)
+++ branches/py3k/Modules/_struct.c	2007-08-24 22:13:32 UTC (rev 4010)
@@ -1860,7 +1860,7 @@
                PyMem_FREE(s->s_codes);
        }
        Py_XDECREF(s->s_format);
-       s->ob_type->tp_free((PyObject *)s);
+       Py_Type(s)->tp_free((PyObject *)s);
 }
 
 static PyObject *
@@ -2288,11 +2288,11 @@
 #endif
        }
 
-       PyStructType.ob_type = &PyType_Type;
+       Py_Type(&PyStructType) = &PyType_Type;
        if (PyType_Ready(&PyStructType) < 0)
                return;
 
-       PyFieldTupleType.ob_type = &PyType_Type;
+       Py_Type(&PyFieldTupleType) = &PyType_Type;
        if (PyType_Read(&PyFieldTupleType) < 0)
                return;
 



More information about the Numpy-svn mailing list