Skip to content

Commit

Permalink
ENH: Fix minor errors in pywrapper.
Browse files Browse the repository at this point in the history
  • Loading branch information
MilanSkocic committed Dec 7, 2023
1 parent 87a8f3d commit 192f1fa
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
5 changes: 3 additions & 2 deletions pywrapper/pyecx/py_common.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "py_common.h"

#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "py_common.h"

Py_buffer create_new_buffer(char *format, Py_ssize_t itemsize, Py_ssize_t ndim, Py_ssize_t *shape){

Expand Down
3 changes: 0 additions & 3 deletions pywrapper/pyecx/py_common.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#ifndef PY_COMMON_H
#define PY_COMMON_H
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#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
3 changes: 3 additions & 0 deletions pywrapper/pyecx/py_core.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "ecx.h"
#include "py_common.h"

PyDoc_STRVAR(module_docstring, "C extension wrapping the CORE module of the Fortran ecx library.");
Expand Down
3 changes: 3 additions & 0 deletions pywrapper/pyecx/py_eis.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "ecx.h"
#include "py_common.h"

PyDoc_STRVAR(module_docstring, "C extension wrapping the EIS module of the Fortran ecx library.");
Expand Down
3 changes: 3 additions & 0 deletions pywrapper/pyecx/py_kinetics.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#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.";
Expand Down

0 comments on commit 192f1fa

Please sign in to comment.