File tree Expand file tree Collapse file tree 3 files changed +2
-35
lines changed Expand file tree Collapse file tree 3 files changed +2
-35
lines changed Original file line number Diff line number Diff line change @@ -670,7 +670,6 @@ typedef enum {
670670#define PYGAMEAPI_RWOBJECT_NUMSLOTS 5
671671#define PYGAMEAPI_PIXELARRAY_NUMSLOTS 2
672672#define PYGAMEAPI_COLOR_NUMSLOTS 5
673- #define PYGAMEAPI_MATH_NUMSLOTS 2
674673#define PYGAMEAPI_BASE_NUMSLOTS 30
675674#define PYGAMEAPI_EVENT_NUMSLOTS 10
676675#define PYGAMEAPI_WINDOW_NUMSLOTS 1
Original file line number Diff line number Diff line change @@ -509,26 +509,10 @@ typedef struct pgColorObject pgColorObject;
509509#endif /* PYGAMEAPI_COLOR_INTERNAL */
510510
511511/*
512- * Math module
512+ * Geometry module
513513 */
514- #ifndef PYGAMEAPI_MATH_INTERNAL
515- #define pgVector2_Check (x ) \
516- ((x)->ob_type == (PyTypeObject *)PYGAMEAPI_GET_SLOT(math, 0))
517-
518- #define pgVector3_Check (x ) \
519- ((x)->ob_type == (PyTypeObject *)PYGAMEAPI_GET_SLOT(math, 1))
520- /*
521- #define pgVector2_New \
522- (*(PyObject*(*)) \
523- PYGAMEAPI_GET_SLOT(PyGAME_C_API, 1))
524- */
525- #define import_pygame_math () IMPORT_PYGAME_MODULE(math)
526- #endif /* PYGAMEAPI_MATH_INTERNAL */
527-
528514#ifndef PYGAMEAPI_GEOMETRY_INTERNAL
529-
530515#define import_pygame_geometry () IMPORT_PYGAME_MODULE(geometry)
531-
532516#endif /* ~PYGAMEAPI_GEOMETRY_INTERNAL */
533517
534518/*
Original file line number Diff line number Diff line change @@ -4625,9 +4625,7 @@ MODINIT_DEFINE(pg_math)
46254625MODINIT_DEFINE (math )
46264626#endif
46274627{
4628- PyObject * module , * apiobj ;
4629- static void * c_api [PYGAMEAPI_MATH_NUMSLOTS ];
4630-
4628+ PyObject * module ;
46314629 static struct PyModuleDef _module = {PyModuleDef_HEAD_INIT ,
46324630 "math" ,
46334631 DOC_MATH ,
@@ -4667,19 +4665,5 @@ MODINIT_DEFINE(math)
46674665 return NULL ;
46684666 }
46694667
4670- /* export the C api */
4671- c_api [0 ] = & pgVector2_Type ;
4672- c_api [1 ] = & pgVector3_Type ;
4673- /*
4674- c_api[2] = pgVector_NEW;
4675- c_api[3] = pgVectorCompatible_Check;
4676- */
4677- apiobj = encapsulate_api (c_api , "math" );
4678- if (PyModule_AddObject (module , PYGAMEAPI_LOCAL_ENTRY , apiobj )) {
4679- Py_XDECREF (apiobj );
4680- Py_DECREF (module );
4681- return NULL ;
4682- }
4683-
46844668 return module ;
46854669}
You can’t perform that action at this time.
0 commit comments