diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-03-23 06:08:45 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-03-23 06:08:45 -0700 |
commit | 3d27521df2a8174eb470a30ce6c4fd84b7d61464 (patch) | |
tree | 27a05115ae6469a11b7ed6bdc8e362ac5a07484f /args.h | |
parent | 2a8b1e4388daa00005cbc1e25913479075507ab2 (diff) | |
download | txr-3d27521df2a8174eb470a30ce6c4fd84b7d61464.tar.gz txr-3d27521df2a8174eb470a30ce6c4fd84b7d61464.tar.bz2 txr-3d27521df2a8174eb470a30ce6c4fd84b7d61464.zip |
umethod: use new dynamic args to avoid consing list.
* args.c (args_cat): New function.
* args.h (args_cat): Declared.
* struct.c (umethod_args_fun): env parameter is now a dynamic
args object. Code adjusted accordingly.
(umethod): Duplicate the args into a dynamic args object
instead of consing up a list and also eliminate the temporary
cons since we can pass the additional argument using the car
field of the dynamic args.
Diffstat (limited to 'args.h')
-rw-r--r-- | args.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -181,6 +181,7 @@ INLINE cnum args_count(struct args *args) val args_get_checked(val name, struct args *args, cnum *arg_index); struct args *args_copy(struct args *to, struct args *from); struct args *args_copy_zap(struct args *to, struct args *from); +struct args *args_cat(struct args *to, struct args *from); struct args *args_cat_zap(struct args *to, struct args *from); struct args *args_cat_zap_from(struct args *to, struct args *from, cnum index); struct args *args_copy_reverse(struct args *to, struct args *from, cnum nargs); |