1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-02-02 15:09:23 -05:00

SMJS: move comments to match spidermonkeyFunctionSpec[]

Each C function that can be called as a method of an ECMAScript object
is typically listed in a spidermonkeyFunctionSpec array and has a
comment that shows the name of the array and the name of the method.
For example, elinks_alert has a comment /* @elinks_funcs{"alert"} */
because elinks_funcs[] contains an element { "alert", elinks_alert, 1 }.

When some of those functions were split into outer and inner functions
for SpiderMonkey 1.8.5 compatibility, the comments were attached to
the inner functions, which contain the bulk of the code.  Move the
comments to the outer functions, to which the array elements point.
This commit is contained in:
Kalle Olavi Niemitalo 2012-11-26 00:15:09 +02:00 committed by Kalle Olavi Niemitalo
parent c4a23543fd
commit 268249c50b

View File

@ -767,6 +767,7 @@ form_elements_get_property(JSContext *ctx, JSObject *obj, jsid id, jsval *vp)
return JS_TRUE;
}
/* @form_elements_funcs{"item"} */
static JSBool
form_elements_item(JSContext *ctx, uintN argc, jsval *rval)
{
@ -779,7 +780,6 @@ form_elements_item(JSContext *ctx, uintN argc, jsval *rval)
return ret;
}
/* @form_elements_funcs{"item"} */
static JSBool
form_elements_item2(JSContext *ctx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
@ -839,6 +839,7 @@ form_elements_item2(JSContext *ctx, JSObject *obj, uintN argc, jsval *argv, jsva
return JS_TRUE;
}
/* @form_elements_funcs{"namedItem"} */
static JSBool
form_elements_namedItem(JSContext *ctx, uintN argc, jsval *rval)
{
@ -851,7 +852,6 @@ form_elements_namedItem(JSContext *ctx, uintN argc, jsval *rval)
return ret;
}
/* @form_elements_funcs{"namedItem"} */
static JSBool
form_elements_namedItem2(JSContext *ctx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
@ -1467,6 +1467,7 @@ forms_get_property(JSContext *ctx, JSObject *obj, jsid id, jsval *vp)
return JS_TRUE;
}
/* @forms_funcs{"item"} */
static JSBool
forms_item(JSContext *ctx, uintN argc, jsval *rval)
{
@ -1479,7 +1480,6 @@ forms_item(JSContext *ctx, uintN argc, jsval *rval)
return ret;
}
/* @forms_funcs{"item"} */
static JSBool
forms_item2(JSContext *ctx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{