You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
static PyObject *frame_data(PyObject *self, PyObject *args) and static PyObject *get_data(PyObject *self, PyObject args)
both declare a const char array which PyArg_ParseTuple is supposed to populate. The behavior seems undefined as this works on my windows computer, but not on the mac.
Allocating a size for the c arrays fixes the issue, f.ex:
const char send_data[255]; instead of const char *send_data
The text was updated successfully, but these errors were encountered:
I got it working correctly on both arm mac and windows by using the safer specifer z#, instead of s# in
if (!PyArg_ParseTuple(args, "z#|II", &send_data, &data_length, &frame_type, &seq_no)) and
if (!PyArg_ParseTuple(args, "z#", &frame_data, &buf_length))
using Py_ssize_t for buf_length/data_length
z# actually allocates the memory if i understood it correctly, while s# does not.
static PyObject *frame_data(PyObject *self, PyObject *args) and static PyObject *get_data(PyObject *self, PyObject args)
both declare a const char array which PyArg_ParseTuple is supposed to populate. The behavior seems undefined as this works on my windows computer, but not on the mac.
Allocating a size for the c arrays fixes the issue, f.ex:
const char send_data[255]; instead of const char *send_data
The text was updated successfully, but these errors were encountered: