diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-12-09 09:19:34 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-12-09 09:19:34 +0200 |
commit | fca1d1aa62306fc523d192c1e2dd2d20dccbe94f (patch) | |
tree | 84d6d04181f3259a3c2dfe325c02c8026f31edae /py/stackctrl.c | |
parent | dea3fb93c74ae61dc5168b62a780dc6ce7865e09 (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