diff options
author | INADA Naoki <songofacandy@gmail.com> | 2013-10-19 23:11:34 -0700 |
---|---|---|
committer | INADA Naoki <songofacandy@gmail.com> | 2013-10-19 23:11:34 -0700 |
commit | ec0691fb2c7ca28eb4544b98dcb5e59933233997 (patch) | |
tree | 136944ccbafb433abde9b86d99cbade8a28d9598 /msgpack/unpack.h | |
parent | f45d7b4e2d362222698b755444ffb61f1cf74b02 (diff) | |
parent | 7123341ca89a9a3afee8521cc16a1a419ea8871e (diff) | |
download | msgpack-python-ec0691fb2c7ca28eb4544b98dcb5e59933233997.tar.gz |
Merge pull request #77 from msgpack/newspec
[WIP] Support new spec.
Diffstat (limited to 'msgpack/unpack.h')
-rw-r--r-- | msgpack/unpack.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/msgpack/unpack.h b/msgpack/unpack.h index baeed1f..03c735e 100644 --- a/msgpack/unpack.h +++ b/msgpack/unpack.h @@ -226,4 +226,13 @@ static inline int unpack_callback_raw(unpack_user* u, const char* b, const char* return 0; } +static inline int unpack_callback_bin(unpack_user* u, const char* b, const char* p, unsigned int l, msgpack_unpack_object* o) +{ + PyObject *py = PyBytes_FromStringAndSize(p, l); + if (!py) + return -1; + *o = py; + return 0; +} + #include "unpack_template.h" |