[Numpy-svn] r2896 - branches/ver1.0/numpy/core/src

numpy-svn at scipy.org numpy-svn at scipy.org
Wed Jul 26 08:28:08 EDT 2006


Author: cookedm
Date: 2006-07-26 07:28:06 -0500 (Wed, 26 Jul 2006)
New Revision: 2896

Modified:
   branches/ver1.0/numpy/core/src/scalartypes.inc.src
Log:
Fix for #207. Need to convert void * to char * before doing pointer arithmetic.


Modified: branches/ver1.0/numpy/core/src/scalartypes.inc.src
===================================================================
--- branches/ver1.0/numpy/core/src/scalartypes.inc.src	2006-07-26 11:51:30 UTC (rev 2895)
+++ branches/ver1.0/numpy/core/src/scalartypes.inc.src	2006-07-26 12:28:06 UTC (rev 2896)
@@ -907,7 +907,7 @@
 
 	typecode = _realdescr_fromcomplexscalar(self, &typenum);
 	if (PyArray_IsScalar(self, ComplexFloating)) {
-            ret = PyArray_Scalar(scalar_value(self, NULL)
+            ret = PyArray_Scalar((char *)scalar_value(self, NULL)
                                  + typecode->elsize, typecode, NULL);
 	}
 	else if (PyArray_IsScalar(self, Object)) {




More information about the Numpy-svn mailing list