Skip to content

Commit

Permalink
python: Fix argument type for can init
Browse files Browse the repository at this point in the history
Fix argument type on `pycsp_can_socketcan_init()` .
Use int16_t instead of an int.

Signed-off-by: Gaetan Perrot <[email protected]>
  • Loading branch information
moonlight83340 committed May 2, 2024
1 parent f33f496 commit cee2ba1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bindings/python/pycsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -854,8 +854,8 @@ static PyObject * pycsp_can_socketcan_init(PyObject * self, PyObject * args) {
char * ifc;
int bitrate = 1000000;
int promisc = 0;
int addr = 0;
if (!PyArg_ParseTuple(args, "s|iii", &ifc, &addr, &bitrate, &promisc)) {
int16_t addr = 0;
if (!PyArg_ParseTuple(args, "s|hii", &ifc, &addr, &bitrate, &promisc)) {
return NULL;
}

Expand Down

0 comments on commit cee2ba1

Please sign in to comment.