diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-04-13 06:21:30 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-04-13 06:21:30 -0700 |
commit | c75ca9d95e8ff7883bd1f193f3723e2a9f76271a (patch) | |
tree | c62e27047f0ef060f6017e92bdc829928da65483 | |
parent | 24775de56ed4eedc53c2e421952a9607eb35cc7e (diff) | |
download | txr-c75ca9d95e8ff7883bd1f193f3723e2a9f76271a.tar.gz txr-c75ca9d95e8ff7883bd1f193f3723e2a9f76271a.tar.bz2 txr-c75ca9d95e8ff7883bd1f193f3723e2a9f76271a.zip |
Broken argument handling in umethod.
* struct.c (umethod_fun): Use proper args interfaces
to check whether there is an object argument, and
to extract it.
-rw-r--r-- | struct.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -932,11 +932,12 @@ static val umethod_fun(val sym, struct args *args) { val self = lit("umethod"); - if (args->argc == 0) { + if (!args_more(args, 0)) { uw_throwf(error_s, lit("~a: object argument required to call ~s"), self, env, nao); } else { - val strct = args->arg[0]; + val strct = args_at(args, 0); + struct struct_inst *si = struct_handle(strct, self); if (symbolp(sym)) { |