[Numpy-svn] r5703 - trunk/numpy/core/include/numpy

numpy-svn at scipy.org numpy-svn at scipy.org
Tue Aug 26 01:33:29 EDT 2008


Author: stefan
Date: 2008-08-26 00:32:57 -0500 (Tue, 26 Aug 2008)
New Revision: 5703

Modified:
   trunk/numpy/core/include/numpy/ndarrayobject.h
Log:
Add NPY_FEATURE_VERSION which can be used to mark minor API version
increments.


Modified: trunk/numpy/core/include/numpy/ndarrayobject.h
===================================================================
--- trunk/numpy/core/include/numpy/ndarrayobject.h	2008-08-25 22:06:08 UTC (rev 5702)
+++ trunk/numpy/core/include/numpy/ndarrayobject.h	2008-08-26 05:32:57 UTC (rev 5703)
@@ -38,13 +38,26 @@
 #define NPY_FAIL 0
 #define NPY_SUCCEED 1
 
-        /* Helpful to distinguish what is installed */
+/* Binary compatibility version number.  This number is increased
+   whenever the C-API is changed such that binary compatibility is
+   broken, i.e. whenever a recompile of extension modules is
+   needed. */
 #define NPY_VERSION 0x01000009
 
-        /* Some platforms don't define bool, long long, or long double.
-           Handle that here.
-         */
+/* Minor API version.  This number is increased whenever a change is
+   made to the C-API -- whether it breaks binary compatibility or not.
+   Some changes, such as adding a function pointer to the end of the
+   function table, can be made without breaking binary compatibility.
+   In this case, only the NPY_FEATURE_VERSION (*not* NPY_VERSION)
+   would be increased.  Whenever binary compatibility is broken, both
+   NPY_VERSION and NPY_FEATURE_VERSION should be increased.
+ */
+#define NPY_FEATURE_VERSION 0x00000001
 
+/* Some platforms don't define bool, long long, or long double.
+   Handle that here.
+*/
+
 #define NPY_BYTE_FMT "hhd"
 #define NPY_UBYTE_FMT "hhu"
 #define NPY_SHORT_FMT "hd"




More information about the Numpy-svn mailing list