[Numpy-svn] r4497 - trunk/numpy/doc/swig

numpy-svn@scip... numpy-svn@scip...
Fri Nov 23 13:43:22 CST 2007


Author: wfspotz@sandia.gov
Date: 2007-11-23 13:43:20 -0600 (Fri, 23 Nov 2007)
New Revision: 4497

Modified:
   trunk/numpy/doc/swig/numpy.i
Log:
Changed #define to %#define so that they delay implementation

Modified: trunk/numpy/doc/swig/numpy.i
===================================================================
--- trunk/numpy/doc/swig/numpy.i	2007-11-23 19:30:04 UTC (rev 4496)
+++ trunk/numpy/doc/swig/numpy.i	2007-11-23 19:43:20 UTC (rev 4497)
@@ -59,14 +59,14 @@
 {
 /* Macros to extract array attributes.
  */
-#define is_array(a)            ((a) && PyArray_Check((PyArrayObject *)a))
-#define array_type(a)          (int)(PyArray_TYPE(a))
-#define array_numdims(a)       (((PyArrayObject *)a)->nd)
-#define array_dimensions(a)    (((PyArrayObject *)a)->dimensions)
-#define array_size(a,i)        (((PyArrayObject *)a)->dimensions[i])
-#define array_data(a)          (((PyArrayObject *)a)->data)
-#define array_is_contiguous(a) (PyArray_ISCONTIGUOUS(a))
-#define array_is_native(a)     (PyArray_ISNOTSWAPPED(a))
+%#define is_array(a)            ((a) && PyArray_Check((PyArrayObject *)a))
+%#define array_type(a)          (int)(PyArray_TYPE(a))
+%#define array_numdims(a)       (((PyArrayObject *)a)->nd)
+%#define array_dimensions(a)    (((PyArrayObject *)a)->dimensions)
+%#define array_size(a,i)        (((PyArrayObject *)a)->dimensions[i])
+%#define array_data(a)          (((PyArrayObject *)a)->data)
+%#define array_is_contiguous(a) (PyArray_ISCONTIGUOUS(a))
+%#define array_is_native(a)     (PyArray_ISNOTSWAPPED(a))
 }
 
 /**********************************************************************/



More information about the Numpy-svn mailing list