[gjs] modules/system: Fix system.exit



commit 7087b494f8f515887f516442d879c22873c04426
Author: Colin Walters <walters verbum org>
Date:   Fri Jul 26 01:24:09 2013 +0100

    modules/system: Fix system.exit
    
    https://bugzilla.gnome.org/show_bug.cgi?id=703826

 modules/system.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/modules/system.c b/modules/system.c
index 1626bb0..8ae4e62 100644
--- a/modules/system.c
+++ b/modules/system.c
@@ -113,7 +113,7 @@ gjs_exit(JSContext *context,
 {
     jsval *argv = JS_ARGV(cx, vp);
     gint32 ecode;
-    if (!gjs_parse_args(context, "exit", "i", argc, argv, &ecode))
+    if (!gjs_parse_args(context, "exit", "i", argc, argv, "ecode", &ecode))
         return JS_FALSE;
     exit(ecode);
     return JS_TRUE;
@@ -155,7 +155,7 @@ gjs_js_define_system_stuff(JSContext *context,
     if (!JS_DefineFunction(context, module,
                            "exit",
                            (JSNative) gjs_exit,
-                           0, GJS_MODULE_PROP_FLAGS))
+                           1, GJS_MODULE_PROP_FLAGS))
         return JS_FALSE;
 
     retval = JS_FALSE;


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