diff --git a/pywrapper/pyecx/py_common.c b/pywrapper/pyecx/py_common.c index bb4eade..829c218 100644 --- a/pywrapper/pyecx/py_common.c +++ b/pywrapper/pyecx/py_common.c @@ -1,5 +1,6 @@ -#include "py_common.h" - +#define PY_SSIZE_T_CLEAN +#include +#include "py_common.h" Py_buffer create_new_buffer(char *format, Py_ssize_t itemsize, Py_ssize_t ndim, Py_ssize_t *shape){ diff --git a/pywrapper/pyecx/py_common.h b/pywrapper/pyecx/py_common.h index 8520919..c2f1c2a 100644 --- a/pywrapper/pyecx/py_common.h +++ b/pywrapper/pyecx/py_common.h @@ -1,8 +1,5 @@ #ifndef PY_COMMON_H #define PY_COMMON_H -#define PY_SSIZE_T_CLEAN -#include -#include "ecx.h" Py_buffer create_new_buffer(char *format, Py_ssize_t itemsize, Py_ssize_t ndim, Py_ssize_t *shape); Py_buffer *get_buffer(PyObject *o); #endif \ No newline at end of file diff --git a/pywrapper/pyecx/py_core.c b/pywrapper/pyecx/py_core.c index eaaf3f2..6585858 100644 --- a/pywrapper/pyecx/py_core.c +++ b/pywrapper/pyecx/py_core.c @@ -1,3 +1,6 @@ +#define PY_SSIZE_T_CLEAN +#include +#include "ecx.h" #include "py_common.h" PyDoc_STRVAR(module_docstring, "C extension wrapping the CORE module of the Fortran ecx library."); diff --git a/pywrapper/pyecx/py_eis.c b/pywrapper/pyecx/py_eis.c index 4eeabaa..88cc884 100644 --- a/pywrapper/pyecx/py_eis.c +++ b/pywrapper/pyecx/py_eis.c @@ -1,3 +1,6 @@ +#define PY_SSIZE_T_CLEAN +#include +#include "ecx.h" #include "py_common.h" PyDoc_STRVAR(module_docstring, "C extension wrapping the EIS module of the Fortran ecx library."); diff --git a/pywrapper/pyecx/py_kinetics.c b/pywrapper/pyecx/py_kinetics.c index bc233d2..31f53ca 100644 --- a/pywrapper/pyecx/py_kinetics.c +++ b/pywrapper/pyecx/py_kinetics.c @@ -1,3 +1,6 @@ +#define PY_SSIZE_T_CLEAN +#include +#include "ecx.h" #include "py_common.h" const char ERR_MSG_ARGS[] = "U must be objects with the buffer protocol and all other parameter are floats.";