[gjs] xulrunner 1.9.3: Drop use of JS_PushArgumentsVA



commit ee0e97375a6d9c6a2eef3f76e6b86a2e5f7a3efd
Author: Maxim Ermilov <zaspire rambler ru>
Date:   Sat Sep 18 16:41:12 2010 -0400

    xulrunner 1.9.3: Drop use of JS_PushArgumentsVA
    
    JS_PushArgumentsVA vanished in 1.9.3; since it was only used in
    debugger.c, which was itself just removed, delete it.
    
    Separated from a larger patch by
    Colin Walters <walters verbum org>

 gi/closure.c |   39 ---------------------------------------
 gi/closure.h |    5 -----
 2 files changed, 0 insertions(+), 44 deletions(-)
---
diff --git a/gi/closure.c b/gi/closure.c
index 1ae360b..c6392d4 100644
--- a/gi/closure.c
+++ b/gi/closure.c
@@ -287,45 +287,6 @@ gjs_closure_invoke(GClosure *closure,
     JS_EndRequest(context);
 }
 
-gboolean
-gjs_closure_invoke_simple(JSContext   *context,
-                          GClosure    *closure,
-                          jsval       *retval,
-                          const gchar *format,
-                          ...)
-{
-    va_list ap;
-    int argc;
-    void *stack_space;
-    jsval *argv;
-    int i;
-
-    JS_BeginRequest(context);
-
-    va_start(ap, format);
-    argv = JS_PushArgumentsVA(context, &stack_space, format, ap);
-    va_end(ap);
-    if (!argv)
-        return FALSE;
-
-    argc = (int)strlen(format);
-    for (i = 0; i < argc; i++)
-        JS_AddValueRoot(context, &argv[i]);
-    JS_AddValueRoot(context, retval);
-
-    gjs_closure_invoke(closure, argc, argv, retval);
-
-    for (i = 0; i < argc; i++)
-        JS_RemoveValueRoot(context, &argv[i]);
-    JS_RemoveValueRoot(context, retval);
-
-    JS_PopArguments(context, stack_space);
-
-    JS_EndRequest(context);
-
-    return TRUE;
-}
-
 JSContext*
 gjs_closure_get_context(GClosure *closure)
 {
diff --git a/gi/closure.h b/gi/closure.h
index 0a4c1a4..1ec452c 100644
--- a/gi/closure.h
+++ b/gi/closure.h
@@ -37,11 +37,6 @@ void       gjs_closure_invoke        (GClosure     *closure,
                                       int           argc,
                                       jsval        *argv,
                                       jsval        *retval);
-gboolean   gjs_closure_invoke_simple (JSContext    *context,
-                                      GClosure     *closure,
-                                      jsval        *retval,
-                                      const gchar  *format,
-                                      ...);
 JSContext* gjs_closure_get_context   (GClosure     *closure);
 JSObject*  gjs_closure_get_callable  (GClosure     *closure);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]