diff options
author | Damien George <damien.p.george@gmail.com> | 2014-03-31 11:30:17 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-03-31 11:30:17 +0100 |
commit | 3056509e00c02e4faef44d90bf3953dcf0b0d4a0 (patch) | |
tree | f188e15e19a8ae43d777215a3e05807b1ef2c21a /py/emitcpy.c | |
parent | e0f2979aed58499e791b01a77190d7f266cc88ea (diff) |
py: Rename and reorder parameters in emit_make_function/closure.
In preparation for implementing default keyword arguments.
Diffstat (limited to 'py/emitcpy.c')
-rw-r--r-- | py/emitcpy.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/py/emitcpy.c b/py/emitcpy.c index aa6bad9d6..4f5a96f2e 100644 --- a/py/emitcpy.c +++ b/py/emitcpy.c @@ -759,19 +759,19 @@ STATIC void load_cpy_const_code_and_name(emit_t *emit, qstr qstr) { } } -STATIC void emit_cpy_make_function(emit_t *emit, scope_t *scope, int n_dict_params, int n_default_params) { +STATIC void emit_cpy_make_function(emit_t *emit, scope_t *scope, uint n_pos_defaults, uint n_kw_defaults) { load_cpy_const_code_and_name(emit, scope->simple_name); - emit_pre(emit, -1 - n_default_params - 2 * n_dict_params, 3); + emit_pre(emit, -1 - n_pos_defaults - 2 * n_kw_defaults, 3); if (emit->pass == PASS_3) { - printf("MAKE_FUNCTION %d\n", (n_dict_params << 8) | n_default_params); + printf("MAKE_FUNCTION %d\n", (n_kw_defaults << 8) | n_pos_defaults); } } -STATIC void emit_cpy_make_closure(emit_t *emit, scope_t *scope, int n_dict_params, int n_default_params) { +STATIC void emit_cpy_make_closure(emit_t *emit, scope_t *scope, uint n_pos_defaults, uint n_kw_defaults) { load_cpy_const_code_and_name(emit, scope->simple_name); - emit_pre(emit, -2 - n_default_params - 2 * n_dict_params, 3); + emit_pre(emit, -2 - n_pos_defaults - 2 * n_kw_defaults, 3); if (emit->pass == PASS_3) { - printf("MAKE_CLOSURE %d\n", (n_dict_params << 8) | n_default_params); + printf("MAKE_CLOSURE %d\n", (n_kw_defaults << 8) | n_pos_defaults); } } |