Skip to content

Commit cda8479

Browse files
one more fix...
Signed-off-by: David Rebbe <drebbe@intrepidcs.com>
1 parent 3e27672 commit cda8479

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
MAJOR_VERSION = 910
1212
MINOR_VERSION = 10
13-
POST_VERSION = 4
13+
POST_VERSION = 5
1414

1515
if POST_VERSION:
1616
VERSION_STRING = '%d.%d-%d' % (MAJOR_VERSION, MINOR_VERSION, POST_VERSION)

src/methods.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4004,8 +4004,10 @@ PyObject* meth_generic_api_read_data(PyObject* self, PyObject* args)
40044004
return set_ics_exception(exception_runtime_error(), "icsneoGenericAPIReadData() Failed");
40054005
}
40064006
Py_END_ALLOW_THREADS
4007-
4008-
PyObject* value = Py_BuildValue("Iy#", functionIndex, buffer, length);
4007+
4008+
PyObject* ba = PyByteArray_FromStringAndSize((const char*)buffer, length);
4009+
PyObject* value = Py_BuildValue("IO", functionIndex, ba);
4010+
Py_DecRef(ba);
40094011
free(buffer);
40104012
buffer = NULL;
40114013
return value;

0 commit comments

Comments
 (0)