uint8_t typemap is happy now

This commit is contained in:
Meredith L. Patterson 2013-11-24 20:23:49 -06:00
parent ddbde60396
commit 05cdf766ab

View file

@ -168,7 +168,13 @@
} }
%typemap(in) uint8_t { %typemap(in) uint8_t {
if (IS_LONG == Z_TYPE_PP($input)) {
$1 = Z_LVAL_PP($input);
} else if (IS_STRING != Z_TYPE_PP($input)) {
// FIXME raise some error
} else {
$1 = *(uint8_t*)Z_STRVAL_PP($input);
}
} }
%typemap(out) HBytes* { %typemap(out) HBytes* {