Private
Public Access
2
0

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:
Brendan Le Foll
2015-02-25 19:23:25 +00:00
parent 797b137826
commit a2220e3636

View File

@@ -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;
}
}