Commit 96389032 authored by Samuel Debionne's avatar Samuel Debionne

Fix conversion compiler warning when calling import_array macro.

sip_init_numpy.cpp:63:5: warning: converting to non-pointer type 'int' 
from NULL [-Wconversion-null]
     import_array();
     ^~~~~~~~~~~~
parent 979e3b3a
Pipeline #29637 passed with stages
in 38 minutes and 3 seconds
......@@ -60,7 +60,14 @@ extern "C"
#if PY_VERSION_HEX >= 0x03000000
int @PROJECT_NAME_LOWER@_import_array()
{
import_array();
//#define import_array1(ret) {
// if (_import_array() < 0) {
// PyErr_Print();
// PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import");
// return ret;
// }
//}
import_array1(-1);
return 0;
}
#else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment