[Numpy-svn] r8183 - in trunk/numpy/core: blasdot src

numpy-svn@scip... numpy-svn@scip...
Sat Feb 20 12:18:36 CST 2010


Author: ptvirtan
Date: 2010-02-20 12:18:36 -0600 (Sat, 20 Feb 2010)
New Revision: 8183

Modified:
   trunk/numpy/core/blasdot/_dotblas.c
   trunk/numpy/core/src/scalarmathmodule.c.src
Log:
3K: Some remaining Py_TYPE issues

Modified: trunk/numpy/core/blasdot/_dotblas.c
===================================================================
--- trunk/numpy/core/blasdot/_dotblas.c	2010-02-20 18:18:18 UTC (rev 8182)
+++ trunk/numpy/core/blasdot/_dotblas.c	2010-02-20 18:18:36 UTC (rev 8183)
@@ -401,7 +401,7 @@
     }
 
     /* Choose which subtype to return */
-    if (Py_Type(ap1) != Py_Type(ap2)) {
+    if (Py_TYPE(ap1) != Py_TYPE(ap2)) {
         prior2 = PyArray_GetPriority((PyObject *)ap2, 0.0);
         prior1 = PyArray_GetPriority((PyObject *)ap1, 0.0);
         subtype = (prior2 > prior1 ? Py_TYPE(ap2) : Py_TYPE(ap1));

Modified: trunk/numpy/core/src/scalarmathmodule.c.src
===================================================================
--- trunk/numpy/core/src/scalarmathmodule.c.src	2010-02-20 18:18:18 UTC (rev 8182)
+++ trunk/numpy/core/src/scalarmathmodule.c.src	2010-02-20 18:18:36 UTC (rev 8183)
@@ -556,7 +556,7 @@
         if (!PyArray_IsScalar(a, Number)) {
             return -1;
         }
-        descr1 = PyArray_DescrFromTypeObject((PyObject *)(a->ob_type));
+        descr1 = PyArray_DescrFromTypeObject((PyObject *)Py_TYPE(a));
         if (PyArray_CanCastSafely(descr1->type_num, PyArray_@NAME@)) {
             PyArray_CastScalarDirect(a, descr1, arg1, PyArray_@NAME@);
             Py_DECREF(descr1);



More information about the Numpy-svn mailing list