summaryrefslogtreecommitdiff
path: root/py/stackctrl.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-12-09 09:19:34 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-12-09 09:19:34 +0200
commitfca1d1aa62306fc523d192c1e2dd2d20dccbe94f (patch)
tree84d6d04181f3259a3c2dfe325c02c8026f31edae /py/stackctrl.c
parentdea3fb93c74ae61dc5168b62a780dc6ce7865e09 (diff)
py/objfun: Factor out macro for decoding codestate size.
fun_bc_call() starts with almost the same code as mp_obj_fun_bc_prepare_codestate(), the only difference is a way to allocate the codestate object (heap vs stack with heap fallback). Still, would be nice to avoid code duplication to make further refactoring easier. So, this commit factors out the common code before the allocation - decoding and calculating codestate size. It produces two values, so structured as a macro which writes to 2 variables passed as arguments.
Diffstat (limited to 'py/stackctrl.c')
0 files changed, 0 insertions, 0 deletions