mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-06 17:59:52 +00:00
Check return value of _end functions.
This commit is contained in:
parent
79e44f86c9
commit
ce2c5b22ef
1 changed files with 3 additions and 3 deletions
|
|
@ -145,7 +145,7 @@ msgpack_unpack_func(int, _execute)(msgpack_unpack_struct(_context)* ctx, const c
|
|||
if(top >= MSGPACK_EMBED_STACK_SIZE) { goto _failed; } /* FIXME */ \
|
||||
if(construct_cb(func)(user, count_, &stack[top].obj) < 0) { goto _failed; } \
|
||||
if((count_) == 0) { obj = stack[top].obj; \
|
||||
construct_cb(func##_end)(user, &obj); \
|
||||
if (construct_cb(func##_end)(user, &obj) < 0) { goto _failed; } \
|
||||
goto _push; } \
|
||||
stack[top].ct = ct_; \
|
||||
stack[top].size = count_; \
|
||||
|
|
@ -346,7 +346,7 @@ _push:
|
|||
if(construct_cb(_array_item)(user, c->count, &c->obj, obj) < 0) { goto _failed; }
|
||||
if(++c->count == c->size) {
|
||||
obj = c->obj;
|
||||
construct_cb(_array_end)(user, &obj);
|
||||
if (construct_cb(_array_end)(user, &obj) < 0) { goto _failed; }
|
||||
--top;
|
||||
/*printf("stack pop %d\n", top);*/
|
||||
goto _push;
|
||||
|
|
@ -360,7 +360,7 @@ _push:
|
|||
if(construct_cb(_map_item)(user, c->count, &c->obj, c->map_key, obj) < 0) { goto _failed; }
|
||||
if(++c->count == c->size) {
|
||||
obj = c->obj;
|
||||
construct_cb(_map_end)(user, &obj);
|
||||
if (construct_cb(_map_end)(user, &obj) < 0) { goto _failed; }
|
||||
--top;
|
||||
/*printf("stack pop %d\n", top);*/
|
||||
goto _push;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue