[Numpy-svn] r8194 - trunk/numpy/core/blasdot

numpy-svn@scip... numpy-svn@scip...
Sat Feb 20 12:22:04 CST 2010


Author: ptvirtan
Date: 2010-02-20 12:22:04 -0600 (Sat, 20 Feb 2010)
New Revision: 8194

Modified:
   trunk/numpy/core/blasdot/_dotblas.c
Log:
BUG: ensure Py_TYPE is available in _dotblas.c on Python 2.4 and 2.5

Modified: trunk/numpy/core/blasdot/_dotblas.c
===================================================================
--- trunk/numpy/core/blasdot/_dotblas.c	2010-02-20 18:21:48 UTC (rev 8193)
+++ trunk/numpy/core/blasdot/_dotblas.c	2010-02-20 18:22:04 UTC (rev 8194)
@@ -10,6 +10,12 @@
 
 #include <stdio.h>
 
+#if (PY_VERSION_HEX < 0x02060000)
+#define Py_TYPE(o)    (((PyObject*)(o))->ob_type)
+#define Py_REFCNT(o)  (((PyObject*)(o))->ob_refcnt)
+#define Py_SIZE(o)    (((PyVarObject*)(o))->ob_size)
+#endif
+
 static PyArray_DotFunc *oldFunctions[PyArray_NTYPES];
 
 static void



More information about the Numpy-svn mailing list