diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-10-04 09:47:43 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-10-04 09:47:43 -0700 |
commit | 0b587e521b5bee74c530adcf4636993ed91036c4 (patch) | |
tree | 6d232443e34c976ef2240538ac792bc876752acc /struct.c | |
parent | 3911b067ed00ad1cda5cdebd9945f1e5d80b6a57 (diff) | |
download | txr-0b587e521b5bee74c530adcf4636993ed91036c4.tar.gz txr-0b587e521b5bee74c530adcf4636993ed91036c4.tar.bz2 txr-0b587e521b5bee74c530adcf4636993ed91036c4.zip |
Bugfix: boa must apply last, as documented.
* struct.c (make_struct): Process property list first,
then call boa constructor, not vice versa.
Diffstat (limited to 'struct.c')
-rw-r--r-- | struct.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -356,6 +356,9 @@ val make_struct(val type, val plist, struct args *args) call_initfun_chain(st, sinst); + for (; plist; plist = cddr(plist)) + slotset(sinst, car(plist), cadr(plist)); + if (args_more(args, 0)) { args_decl(args_copy, max(args->fill + 1, ARGS_MIN)); args_add(args_copy, sinst); @@ -363,9 +366,6 @@ val make_struct(val type, val plist, struct args *args) generic_funcall(st->boactor, args_copy); } - for (; plist; plist = cddr(plist)) - slotset(sinst, car(plist), cadr(plist)); - return sinst; } } |