Merge branch 'stable' into develop

This commit is contained in:
Anne de Jong 2022-05-17 15:07:34 +02:00
commit 5d1b88a883
2 changed files with 7 additions and 6 deletions

1
.gitignore vendored
View File

@ -31,3 +31,4 @@ test/test_uldaq
lasp/device/lasp_daq.cxx lasp/device/lasp_daq.cxx
lasp/c/lasp_config.h lasp/c/lasp_config.h
compile_commands.json compile_commands.json
.cache

View File

@ -91,12 +91,12 @@ static inline PyObject *data_to_ndarray(void *data, int n_rows, int n_cols,
// https://stackoverflow.com/questions/54269956/crash-of-jupyter-due-to-the-use-of-pyarray-enableflags/54278170#54278170 // https://stackoverflow.com/questions/54269956/crash-of-jupyter-due-to-the-use-of-pyarray-enableflags/54278170#54278170
// Note that in general it was disadvised to build all C code with MinGW on // Note that in general it was disadvised to build all C code with MinGW on
// Windows. We do it anyway, see if we find any problems on the way. // Windows. We do it anyway, see if we find any problems on the way.
PyObject *capsule = PyCapsule_New(data, LASP_CAPSULE_NAME, capsule_cleanup); /* PyObject *capsule = PyCapsule_New(data, LASP_CAPSULE_NAME, capsule_cleanup); */
int res = PyArray_SetBaseObject(arr, capsule); /* int res = PyArray_SetBaseObject(arr, capsule); */
if (res != 0) { /* if (res != 0) { */
fprintf(stderr, "Failed to set base object of array!"); /* fprintf(stderr, "Failed to set base object of array!"); */
return NULL; /* return NULL; */
} /* } */
PyArray_ENABLEFLAGS(arr, NPY_OWNDATA); PyArray_ENABLEFLAGS(arr, NPY_OWNDATA);
} }