python-mraa.i: ValueError when expecting bytearray but dont get it
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
@@ -13,6 +13,9 @@
|
||||
// whilst this may seem 'hopeful' it turns out this is safe
|
||||
$1 = (uint8_t*) PyByteArray_AsString($input);
|
||||
$2 = PyByteArray_Size($input);
|
||||
} else {
|
||||
PyErr_SetString(PyExc_ValueError, "bytearray expected");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +25,9 @@
|
||||
// whilst this may seem 'hopeful' it turns out this is safe
|
||||
$1 = (uint8_t*) PyByteArray_AsString($input);
|
||||
$2 = PyByteArray_Size($input);
|
||||
} else {
|
||||
PyErr_SetString(PyExc_ValueError, "bytearray expected");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user