From ea8f4b755d8e6f2bc53e8d6bcf0553be46ef4e6a Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sun, 27 May 2007 18:53:31 +0300 Subject: [PATCH] SEE: Define the synthetic argv as an array. This does not change the behaviour but perhaps makes the code clearer. --- src/ecmascript/see/form.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ecmascript/see/form.c b/src/ecmascript/see/form.c index 28ebd555..2bce9ac4 100644 --- a/src/ecmascript/see/form.c +++ b/src/ecmascript/see/form.c @@ -627,20 +627,20 @@ form_elems_get(struct SEE_interpreter *interp, struct SEE_object *o, SEE_SET_OBJECT(res, jsfe->namedItem); } else { unsigned char *string = see_string_to_unsigned_char(p); - struct SEE_value argv; - struct SEE_value *pargv = &argv; + struct SEE_value arg0; + struct SEE_value *argv[1] = { &arg0 }; if (!string) { SEE_SET_UNDEFINED(res); return; } - SEE_SET_STRING(pargv, p); + SEE_SET_STRING(&arg0, p); if (string[0] >= '0' && string[0] <= '9') { js_form_elems_item(interp, jsfe->item, o, 1, - &pargv, res); + argv, res); } else { js_form_elems_namedItem(interp, jsfe->namedItem, o, 1, - &pargv, res); + argv, res); } mem_free(string); } @@ -748,18 +748,18 @@ forms_get(struct SEE_interpreter *interp, struct SEE_object *o, SEE_SET_OBJECT(res, fo->namedItem); } else { unsigned char *string = see_string_to_unsigned_char(p); - struct SEE_value argv; - struct SEE_value *argv1 = &argv; + struct SEE_value arg0; + struct SEE_value *argv[1] = { &arg0 }; if (!string) { SEE_SET_UNDEFINED(res); return; } - SEE_SET_STRING(argv1, p); + SEE_SET_STRING(&arg0, p); if (string[0] >= '0' && string[0] <= '9') { - js_forms_item(interp, fo->item, o, 1, &argv1, res); + js_forms_item(interp, fo->item, o, 1, argv, res); } else { - js_forms_namedItem(interp, fo->namedItem, o, 1, &argv1, res); + js_forms_namedItem(interp, fo->namedItem, o, 1, argv, res); } mem_free(string); }