Pass the pointer value as a long int to python

The pointer could be truncated which results in an invalid memory
address when trying to get at the array.
pull/159/head
Chris Thornton 2020-04-07 02:18:22 -07:00 committed by Olivier Martin
parent efc656ca52
commit 1779c75062
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ void gattlib_call_notification_handler(struct gattlib_handler *handler, const uu
d_gstate = PyGILState_Ensure();
PyObject *arglist = Py_BuildValue("(sIIO)", uuid_str, data, data_length, handler->user_data);
PyObject *arglist = Py_BuildValue("(sLIO)", uuid_str, data, data_length, handler->user_data);
PyEval_CallObject((PyObject *)handler->notification_handler, arglist);
PyGILState_Release(d_gstate);