Skip to content

Commit 14b5343

Browse files
committed
Fix migration I missed in quaddtype
1 parent e259469 commit 14b5343

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

quaddtype/quaddtype/src/casts.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#include <Python.h>
22

33
#define PY_ARRAY_UNIQUE_SYMBOL quaddtype_ARRAY_API
4+
#define PY_UFUNC_UNIQUE_SYMBOL quaddtype_UFUNC_API
45
#define NPY_NO_DEPRECATED_API NPY_2_0_API_VERSION
56
#define NPY_TARGET_VERSION NPY_2_0_API_VERSION
67
#define NO_IMPORT_ARRAY
8+
#define NO_IMPORT_UFUNC
79
#include "numpy/ndarraytypes.h"
810
#include "numpy/arrayobject.h"
911
#include "numpy/dtype_api.h"

quaddtype/quaddtype/src/dtype.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#include <Python.h>
22

33
#define PY_ARRAY_UNIQUE_SYMBOL quaddtype_ARRAY_API
4+
#define PY_UFUNC_UNIQUE_SYMBOL quaddtype_UFUNC_API
45
#define NPY_NO_DEPRECATED_API NPY_2_0_API_VERSION
56
#define NPY_TARGET_VERSION NPY_2_0_API_VERSION
67
#define NO_IMPORT_ARRAY
8+
#define NO_IMPORT_UFUNC
79
#include "numpy/ndarraytypes.h"
810
#include "numpy/arrayobject.h"
911
#include "numpy/dtype_api.h"

quaddtype/quaddtype/src/quaddtype_main.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#include <Python.h>
22

33
#define PY_ARRAY_UNIQUE_SYMBOL quaddtype_ARRAY_API
4+
#define PY_UFUNC_UNIQUE_SYMBOL quaddtype_UFUNC_API
45
#define NPY_NO_DEPRECATED_API NPY_2_0_API_VERSION
56
#include "numpy/arrayobject.h"
7+
#include "numpy/ufuncobject.h"
68
#include "numpy/dtype_api.h"
79

810
#include "dtype.h"
@@ -19,8 +21,8 @@ static struct PyModuleDef moduledef = {
1921
PyMODINIT_FUNC
2022
PyInit__quaddtype_main(void)
2123
{
22-
if (import_array() < 0)
23-
return NULL;
24+
import_array();
25+
import_umath();
2426

2527
PyObject *m = PyModule_Create(&moduledef);
2628
if (m == NULL) {

quaddtype/quaddtype/src/umath.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#include <Python.h>
22

33
#define PY_ARRAY_UNIQUE_SYMBOL quaddtype_ARRAY_API
4+
#define PY_UFUNC_UNIQUE_SYMBOL quaddtype_UFUNC_API
45
#define NPY_NO_DEPRECATED_API NPY_2_0_API_VERSION
56
#define NPY_TARGET_VERSION NPY_2_0_API_VERSION
67
#define NO_IMPORT_ARRAY
8+
#define NO_IMPORT_UFUNC
79
#include "numpy/ndarraytypes.h"
810
#include "numpy/arrayobject.h"
911
#include "numpy/ufuncobject.h"

0 commit comments

Comments
 (0)