[gjs/wip/xulrunner-1.9.3-rebase7: 10/13] importer: JSID != JSVAL



commit a6b42989d53e3dcc1d066c84cfa57ce126cc7e4e
Author: Colin Walters <walters verbum org>
Date:   Thu Sep 23 17:30:41 2010 -0400

    importer: JSID != JSVAL
    
    Also, the first entry should be JSID(0) technically, to indicate
    "unknown length".
    
    https://bugzilla.gnome.org/show_bug.cgi?id=622896

 gjs/importer.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gjs/importer.c b/gjs/importer.c
index abba364..96050ff 100644
--- a/gjs/importer.c
+++ b/gjs/importer.c
@@ -738,7 +738,7 @@ importer_new_enumerate(JSContext  *context,
             *state_p = JSVAL_NULL;
 
         if (id_p)
-            *id_p = JSID_VOID;
+            *id_p = INT_TO_JSID(0);
 
         priv = priv_from_js(context, object);
         if (!priv)
@@ -845,7 +845,7 @@ importer_new_enumerate(JSContext  *context,
             *state_p = PRIVATE_TO_JSVAL(iter);
 
         if (id_p)
-            *id_p = INT_TO_JSVAL(iter->elements->len);
+            *id_p = INT_TO_JSID(iter->elements->len);
 
         break;
     }



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