Add object_hook option to unpack and default option to pack.

(see simplejson for how to use).
This commit is contained in:
INADA Naoki 2010-10-26 01:26:06 +09:00
parent 367f15c247
commit fa157082ac
4 changed files with 92 additions and 10 deletions

View file

@ -317,6 +317,7 @@ _push:
case CT_MAP_VALUE:
if(msgpack_unpack_callback(_map_item)(user, &c->obj, c->map_key, obj) < 0) { goto _failed; }
if(--c->count == 0) {
msgpack_unpack_callback(_map_end)(user, &c->obj);
obj = c->obj;
--top;
/*printf("stack pop %d\n", top);*/