Commits

Lenard Lindstrom committed 9c2963e

Remove the last vestiges of PyArrayInterface from all source files except base.c

  • Participants
  • Parent commits 4358f6d

Comments (0)

Files changed (4)

     }
 
     /* export the c api */
-#if PYGAMEAPI_BASE_NUMSLOTS != 21
+#if PYGAMEAPI_BASE_NUMSLOTS != 19
 #warning export slot count mismatch
 #endif
     c_api[0] = PyExc_SDLError;
     c_api[10] = PyGame_Video_AutoQuit;
     c_api[11] = PyGame_Video_AutoInit;
     c_api[12] = RGBAFromObj;
-    c_api[13] = ArrayStructAsDict;
-    c_api[14] = PgBuffer_AsArrayInterface;
-    c_api[15] = GetArrayStruct;
-    c_api[16] = PgBuffer_AsArrayStruct;
-    c_api[17] = PgObject_GetBuffer;
-    c_api[18] = PgBuffer_Release;
-    c_api[19] = PgDict_AsBuffer;
-    c_api[20] = PgExc_BufferError;
+    c_api[13] = PgBuffer_AsArrayInterface;
+    c_api[14] = PgBuffer_AsArrayStruct;
+    c_api[15] = PgObject_GetBuffer;
+    c_api[16] = PgBuffer_Release;
+    c_api[17] = PgDict_AsBuffer;
+    c_api[18] = PgExc_BufferError;
     apiobj = encapsulate_api (c_api, "base");
     if (apiobj == NULL) {
         Py_XDECREF (atexit_register);
 #define PYGAMEAPI_MIXER_INTERNAL
 #include "pygame.h"
 #include "pgcompat.h"
-#include "pgarrinter.h"
 #include "doc/mixer_doc.h"
 #include "mixer.h"
 

File src/pygame.h

 #define VIEW_F_ORDER       4
 
 #define PYGAMEAPI_BASE_FIRSTSLOT 0
-#define PYGAMEAPI_BASE_NUMSLOTS 21
+#define PYGAMEAPI_BASE_NUMSLOTS 19
 #ifndef PYGAMEAPI_BASE_INTERNAL
 #define PyExc_SDLError ((PyObject*)PyGAME_C_API[PYGAMEAPI_BASE_FIRSTSLOT])
 
 #define RGBAFromObj                                                     \
     (*(int(*)(PyObject*, Uint8*))PyGAME_C_API[PYGAMEAPI_BASE_FIRSTSLOT + 12])
 
-#define ArrayStructAsDict                                               \
-    (*(PyObject*(*)(PyArrayInterface*))                                 \
-     PyGAME_C_API[PYGAMEAPI_BASE_FIRSTSLOT + 13])
-
 #define PgBuffer_AsArrayInterface                                       \
-    (*(PyObject*(*)(Py_buffer*)) PyGAME_C_API[PYGAMEAPI_BASE_FIRSTSLOT + 14])
-
-#define GetArrayInterface                                               \
-    (*(int(*)(PyObject*, PyObject**, PyArrayInterface**))               \
-     PyGAME_C_API[PYGAMEAPI_BASE_FIRSTSLOT + 15])
+    (*(PyObject*(*)(Py_buffer*)) PyGAME_C_API[PYGAMEAPI_BASE_FIRSTSLOT + 13])
 
 #define PgBuffer_AsArrayStruct                                          \
     (*(PyObject*(*)(Py_buffer*))                                        \
-     PyGAME_C_API[PYGAMEAPI_BASE_FIRSTSLOT + 16])
+     PyGAME_C_API[PYGAMEAPI_BASE_FIRSTSLOT + 14])
 
 #define PgObject_GetBuffer                                              \
     (*(int(*)(PyObject*, Pg_buffer*, int))                              \
-     PyGAME_C_API[PYGAMEAPI_BASE_FIRSTSLOT + 17])
+     PyGAME_C_API[PYGAMEAPI_BASE_FIRSTSLOT + 15])
 
 #define PgBuffer_Release                                                \
     (*(void(*)(Pg_buffer*))                                             \
-     PyGAME_C_API[PYGAMEAPI_BASE_FIRSTSLOT + 18])
+     PyGAME_C_API[PYGAMEAPI_BASE_FIRSTSLOT + 16])
 
 #define PgDict_AsBuffer                                                 \
     (*(int(*)(Pg_buffer*, PyObject*, int))                              \
-     PyGAME_C_API[PYGAMEAPI_BASE_FIRSTSLOT + 19])
+     PyGAME_C_API[PYGAMEAPI_BASE_FIRSTSLOT + 17])
 
 #define PgExc_BufferError                                               \
-    ((PyObject*)PyGAME_C_API[PYGAMEAPI_BASE_FIRSTSLOT + 20])
+    ((PyObject*)PyGAME_C_API[PYGAMEAPI_BASE_FIRSTSLOT + 18])
 
 #define import_pygame_base() IMPORT_PYGAME_MODULE(base, BASE)
 #endif

File src/surface.c

 #include "structmember.h"
 #include "pgcompat.h"
 #include "pgbufferproxy.h"
-#include "pgarrinter.h"
 
 typedef enum {
     VIEWKIND_0D = 0,