summaryrefslogtreecommitdiff
path: root/ext.c
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2016-05-26 12:15:12 -0400
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2016-05-26 12:15:12 -0400
commit87eb0bd877d0503274576c94671f0b4297791b36 (patch)
treee2c490377c1a07fdb7fcc457c61b9a4e5d7005d0 /ext.c
parent7e6d158fcba7c80e982c70617cc646cbf2e0461b (diff)
parent41412a86f2ca0baf908fe0b2e4bcc396f66989ae (diff)
downloadgawk-87eb0bd877d0503274576c94671f0b4297791b36.tar.gz
Merge branch 'gawk-4.1-stable'
Diffstat (limited to 'ext.c')
-rw-r--r--ext.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/ext.c b/ext.c
index 522b18aa..c622599d 100644
--- a/ext.c
+++ b/ext.c
@@ -187,28 +187,14 @@ get_argument(int i)
*/
NODE *
-get_actual_argument(int i, bool optional, bool want_array)
+get_actual_argument(NODE *t, int i, bool optional, bool want_array)
{
- NODE *t;
char *fname;
- int pcount;
INSTRUCTION *pc;
pc = TOP()->code_ptr; /* Op_ext_builtin instruction */
fname = (pc + 1)->func_name;
- pcount = (pc + 1)->expr_count;
- t = get_argument(i);
- if (t == NULL) {
- if (i >= pcount) /* must be fatal */
- fatal(_("function `%s' defined to take no more than %d argument(s)"),
- fname, pcount);
- if (! optional)
- fatal(_("function `%s': missing argument #%d"),
- fname, i + 1);
- return NULL;
- }
-
if (t->type == Node_var_new) {
if (want_array)
return force_array(t, false);