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

numpy-svn at scipy.org numpy-svn at scipy.org
Sat Feb 13 17:56:30 EST 2010


Author: charris
Date: 2010-02-13 16:56:30 -0600 (Sat, 13 Feb 2010)
New Revision: 8109

Modified:
   trunk/numpy/core/blasdot/_dotblas.c
Log:
Fix _dotblas ob_type pointer for py3k.

Modified: trunk/numpy/core/blasdot/_dotblas.c
===================================================================
--- trunk/numpy/core/blasdot/_dotblas.c	2010-02-12 01:18:19 UTC (rev 8108)
+++ trunk/numpy/core/blasdot/_dotblas.c	2010-02-13 22:56:30 UTC (rev 8109)
@@ -401,14 +401,14 @@
     }
 
     /* Choose which subtype to return */
-    if (ap1->ob_type != ap2->ob_type) {
+    if (Py_Type(ap1) != Py_Type(ap2)) {
         prior2 = PyArray_GetPriority((PyObject *)ap2, 0.0);
         prior1 = PyArray_GetPriority((PyObject *)ap1, 0.0);
-        subtype = (prior2 > prior1 ? ap2->ob_type : ap1->ob_type);
+        subtype = (prior2 > prior1 ? Py_TYPE(ap2) : Py_TYPE(ap1));
     }
     else {
         prior1 = prior2 = 0.0;
-        subtype = ap1->ob_type;
+        subtype = Py_TYPE(ap1);
     }
 
     ret = (PyArrayObject *)PyArray_New(subtype, nd, dimensions,
@@ -900,7 +900,7 @@
     /* Choose which subtype to return */
     prior2 = PyArray_GetPriority((PyObject *)ap2, 0.0);
     prior1 = PyArray_GetPriority((PyObject *)ap1, 0.0);
-    subtype = (prior2 > prior1 ? ap2->ob_type : ap1->ob_type);
+    subtype = (prior2 > prior1 ? Py_TYPE(ap2) : Py_TYPE(ap1));
 
     ret = (PyArrayObject *)PyArray_New(subtype, nd, dimensions,
                                        typenum, NULL, NULL, 0, 0,




More information about the Numpy-svn mailing list