Skip to content

Commit

Permalink
Merge pull request #490 from jokva/py-ssize-t
Browse files Browse the repository at this point in the history
Use Py_ssize_t for type-length arguments
  • Loading branch information
jokva authored Oct 14, 2020
2 parents 96c7ca2 + 5c97fe7 commit 4142dff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/segyio/segyio.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#define PY_SSIZE_T_CLEAN
#if defined(_DEBUG) && defined(_MSC_VER)
# define _CRT_NOFORCE_MAINFEST 1
# undef _DEBUG
Expand Down Expand Up @@ -1042,7 +1043,7 @@ PyObject* puttr( segyiofd* self, PyObject* args ) {

int traceno;
char* buffer;
int buflen;
Py_ssize_t buflen;

if( !PyArg_ParseTuple( args, "is#", &traceno, &buffer, &buflen ) )
return NULL;
Expand Down Expand Up @@ -1537,7 +1538,7 @@ PyObject* fread_trace0( PyObject* , PyObject* args ) {
int stride;
int offsets;
int* indices;
int indiceslen;
Py_ssize_t indiceslen;
char* linetype;

if( !PyArg_ParseTuple( args, "iiiis#s", &lineno,
Expand Down

0 comments on commit 4142dff

Please sign in to comment.