[gjs] interface: Fix a bad jsval compare



commit 94c5c7ee68cb6a0b8b0f69281ac646aea0b0f8d5
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Dec 11 23:52:18 2012 -0500

    interface: Fix a bad jsval compare
    
    jsvals are no longer always integers. The public interface
    defines them as unions.

 gi/interface.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gi/interface.c b/gi/interface.c
index 4ad8c7d..41cbb65 100644
--- a/gi/interface.c
+++ b/gi/interface.c
@@ -183,7 +183,7 @@ gjs_define_interface_class(JSContext       *context,
     constructor_name = g_base_info_get_name((GIBaseInfo*)info);
 
     gjs_object_get_property(context, in_object, constructor_name, &value);
-    if (value != JSVAL_VOID) {
+    if (!JSVAL_IS_VOID(value)) {
         JSObject *constructor;
 
         if (!JSVAL_IS_OBJECT(value)) {



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