Skip to content

Commit 90dd4f7

Browse files
committed
update to new DType API version
1 parent 5659778 commit 90dd4f7

File tree

6 files changed

+14
-17
lines changed

6 files changed

+14
-17
lines changed

asciidtype/asciidtype/src/asciidtype_main.c

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

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(5) < 0) {
24+
if (import_experimental_dtype_api(6) < 0) {
2525
return NULL;
2626
}
2727

mpfdtype/mpfdtype/src/mpfdtype_main.c

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,20 @@
99
#include "umath.h"
1010
#include "terrible_hacks.h"
1111

12-
1312
static struct PyModuleDef moduledef = {
14-
PyModuleDef_HEAD_INIT,
15-
.m_name = "mpfdtype_main",
16-
.m_size = -1,
13+
PyModuleDef_HEAD_INIT,
14+
.m_name = "mpfdtype_main",
15+
.m_size = -1,
1716
};
1817

19-
2018
/* Module initialization function */
21-
PyMODINIT_FUNC PyInit__mpfdtype_main(void)
19+
PyMODINIT_FUNC
20+
PyInit__mpfdtype_main(void)
2221
{
2322
if (_import_array() < 0) {
2423
return NULL;
2524
}
26-
if (import_experimental_dtype_api(5) < 0) {
25+
if (import_experimental_dtype_api(6) < 0) {
2726
return NULL;
2827
}
2928

@@ -36,17 +35,15 @@ PyMODINIT_FUNC PyInit__mpfdtype_main(void)
3635
goto error;
3736
}
3837

39-
if (PyModule_AddObject(m,
40-
"MPFloat", (PyObject *)&MPFloat_Type) < 0) {
38+
if (PyModule_AddObject(m, "MPFloat", (PyObject *)&MPFloat_Type) < 0) {
4139
goto error;
4240
}
4341

4442
if (init_mpf_dtype() < 0) {
4543
goto error;
4644
}
4745

48-
if (PyModule_AddObject(m,
49-
"MPFDType", (PyObject *)&MPFDType) < 0) {
46+
if (PyModule_AddObject(m, "MPFDType", (PyObject *)&MPFDType) < 0) {
5047
goto error;
5148
}
5249

@@ -60,7 +57,7 @@ PyMODINIT_FUNC PyInit__mpfdtype_main(void)
6057

6158
return m;
6259

63-
error:
60+
error:
6461
Py_DECREF(m);
6562
return NULL;
6663
}

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(5) < 0) {
26+
if (import_experimental_dtype_api(6) < 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
@@ -21,7 +21,7 @@ PyInit__main(void)
2121
if (_import_array() < 0) {
2222
return NULL;
2323
}
24-
if (import_experimental_dtype_api(5) < 0) {
24+
if (import_experimental_dtype_api(6) < 0) {
2525
return NULL;
2626
}
2727

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(5) < 0) {
24+
if (import_experimental_dtype_api(6) < 0) {
2525
return NULL;
2626
}
2727

0 commit comments

Comments
 (0)