Skip to content

Commit aa1d862

Browse files
authored
Merge pull request #38 from ngoldbaum/resolve-descriptors-signature
adapt to change in resolve_descriptors_function signature
2 parents 254696b + 901de15 commit aa1d862

File tree

7 files changed

+15
-19
lines changed

7 files changed

+15
-19
lines changed

asciidtype/asciidtype/src/asciidtype_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ PyInit__asciidtype_main(void)
2121
if (_import_array() < 0) {
2222
return NULL;
2323
}
24-
if (import_experimental_dtype_api(6) < 0) {
24+
25+
if (import_experimental_dtype_api(7) < 0) {
2526
return NULL;
2627
}
2728

metadatadtype/metadatadtype/src/metadatadtype_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ PyInit__metadatadtype_main(void)
2121
if (_import_array() < 0) {
2222
return NULL;
2323
}
24-
if (import_experimental_dtype_api(6) < 0) {
24+
if (import_experimental_dtype_api(7) < 0) {
2525
return NULL;
2626
}
2727

mpfdtype/mpfdtype/src/mpfdtype_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ PyInit__mpfdtype_main(void)
2222
if (_import_array() < 0) {
2323
return NULL;
2424
}
25-
if (import_experimental_dtype_api(6) < 0) {
25+
if (import_experimental_dtype_api(7) < 0) {
2626
return NULL;
2727
}
2828

quaddtype/quaddtype/src/quaddtype_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ PyInit__quaddtype_main(void)
2323
return NULL;
2424

2525
// Fail to init if the experimental DType API version 5 isn't supported
26-
if (import_experimental_dtype_api(6) < 0) {
26+
if (import_experimental_dtype_api(7) < 0) {
2727
PyErr_SetString(PyExc_ImportError,
2828
"Error encountered importing the experimental dtype API.");
2929
return NULL;

stringdtype/stringdtype/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ PyInit__main(void)
9090
if (_import_array() < 0) {
9191
return NULL;
9292
}
93-
if (import_experimental_dtype_api(6) < 0) {
93+
if (import_experimental_dtype_api(7) < 0) {
9494
return NULL;
9595
}
9696

stringdtype/stringdtype/src/umath.c

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,10 @@ string_equal_strided_loop(PyArrayMethod_Context *context, char *const data[],
4848
}
4949

5050
static NPY_CASTING
51-
string_equal_resolve_descriptors(PyObject *NPY_UNUSED(self),
52-
PyArray_DTypeMeta *NPY_UNUSED(dtypes[]),
53-
PyArray_Descr *given_descrs[],
54-
PyArray_Descr *loop_descrs[],
55-
npy_intp *NPY_UNUSED(view_offset))
51+
string_equal_resolve_descriptors(
52+
struct PyArrayMethodObject_tag *NPY_UNUSED(method),
53+
PyArray_DTypeMeta *NPY_UNUSED(dtypes[]), PyArray_Descr *given_descrs[],
54+
PyArray_Descr *loop_descrs[], npy_intp *NPY_UNUSED(view_offset))
5655
{
5756
Py_INCREF(given_descrs[0]);
5857
loop_descrs[0] = given_descrs[0];
@@ -86,11 +85,10 @@ string_isnan_strided_loop(PyArrayMethod_Context *NPY_UNUSED(context),
8685
}
8786

8887
static NPY_CASTING
89-
string_isnan_resolve_descriptors(PyObject *NPY_UNUSED(self),
90-
PyArray_DTypeMeta *NPY_UNUSED(dtypes[]),
91-
PyArray_Descr *given_descrs[],
92-
PyArray_Descr *loop_descrs[],
93-
npy_intp *NPY_UNUSED(view_offset))
88+
string_isnan_resolve_descriptors(
89+
struct PyArrayMethodObject_tag *NPY_UNUSED(method),
90+
PyArray_DTypeMeta *NPY_UNUSED(dtypes[]), PyArray_Descr *given_descrs[],
91+
PyArray_Descr *loop_descrs[], npy_intp *NPY_UNUSED(view_offset))
9492
{
9593
Py_INCREF(given_descrs[0]);
9694
loop_descrs[0] = given_descrs[0];
@@ -176,9 +174,6 @@ init_ufunc(PyObject *numpy, const char *ufunc_name, PyArray_DTypeMeta **dtypes,
176174
return -1;
177175
}
178176

179-
/*
180-
* Initialize spec for equality
181-
*/
182177
PyType_Slot slots[] = {{NPY_METH_resolve_descriptors, resolve_func},
183178
{NPY_METH_strided_loop, loop_func},
184179
{0, NULL}};

unytdtype/unytdtype/src/unytdtype_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ PyInit__unytdtype_main(void)
2121
if (_import_array() < 0) {
2222
return NULL;
2323
}
24-
if (import_experimental_dtype_api(6) < 0) {
24+
if (import_experimental_dtype_api(7) < 0) {
2525
return NULL;
2626
}
2727

0 commit comments

Comments
 (0)