From 268249c50b8c936dc3be52df68893b4ea4078e00 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Mon, 26 Nov 2012 00:15:09 +0200 Subject: [PATCH] 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. --- src/ecmascript/spidermonkey/form.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ecmascript/spidermonkey/form.c b/src/ecmascript/spidermonkey/form.c index 8f58d989..d448f016 100644 --- a/src/ecmascript/spidermonkey/form.c +++ b/src/ecmascript/spidermonkey/form.c @@ -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) { -- 2.11.4.GIT