diff options
| author | Damien George | 2014-03-31 11:30:17 +0100 |
|---|---|---|
| committer | Damien George | 2014-03-31 11:30:17 +0100 |
| commit | 3056509e00c02e4faef44d90bf3953dcf0b0d4a0 (patch) | |
| tree | f188e15e19a8ae43d777215a3e05807b1ef2c21a /py/emitbc.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/emitbc.c')
| -rw-r--r-- | py/emitbc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/py/emitbc.c b/py/emitbc.c index 0db1aaad8..a149582c0 100644 --- a/py/emitbc.c +++ b/py/emitbc.c @@ -726,9 +726,9 @@ STATIC void emit_bc_unpack_ex(emit_t *emit, int n_left, int n_right) { emit_write_byte_code_byte_uint(emit, MP_BC_UNPACK_EX, n_left | (n_right << 8)); } -STATIC void emit_bc_make_function(emit_t *emit, scope_t *scope, int n_dict_params, int n_default_params) { - assert(n_dict_params == 0); - if (n_default_params == 0) { +STATIC void emit_bc_make_function(emit_t *emit, scope_t *scope, uint n_pos_defaults, uint n_kw_defaults) { + assert(n_kw_defaults == 0); + if (n_pos_defaults == 0) { emit_bc_pre(emit, 1); emit_write_byte_code_byte_uint(emit, MP_BC_MAKE_FUNCTION, scope->unique_code_id); } else { @@ -737,9 +737,9 @@ STATIC void emit_bc_make_function(emit_t *emit, scope_t *scope, int n_dict_param } } -STATIC void emit_bc_make_closure(emit_t *emit, scope_t *scope, int n_dict_params, int n_default_params) { - assert(n_dict_params == 0); - if (n_default_params == 0) { +STATIC void emit_bc_make_closure(emit_t *emit, scope_t *scope, uint n_pos_defaults, uint n_kw_defaults) { + assert(n_kw_defaults == 0); + if (n_pos_defaults == 0) { emit_bc_pre(emit, 0); emit_write_byte_code_byte_uint(emit, MP_BC_MAKE_CLOSURE, scope->unique_code_id); } else { |
