[gjs/wip/js24: 3/11] fix declaration of JSClasses



commit 0eb6c0351f65b9ea0c0184502828f1297b99c622
Author: Tim Lunn <tim feathertop org>
Date:   Mon Sep 23 09:32:16 2013 +1000

    fix declaration of JSClasses

 gi/boxed.cpp      |    4 ++--
 gi/function.cpp   |    4 ++--
 gi/gerror.cpp     |    4 ++--
 gi/interface.cpp  |    4 ++--
 gi/keep-alive.cpp |    4 ++--
 gi/ns.cpp         |    4 ++--
 gi/object.cpp     |    4 ++--
 gi/param.cpp      |    4 ++--
 gi/repo.cpp       |    4 ++--
 gi/union.cpp      |    4 ++--
 gjs/byteArray.cpp |    4 ++--
 gjs/importer.cpp  |    4 ++--
 12 files changed, 24 insertions(+), 24 deletions(-)
---
diff --git a/gi/boxed.cpp b/gi/boxed.cpp
index 8e94438..65029cc 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -65,7 +65,7 @@ static JSBool boxed_set_field_from_value(JSContext   *context,
                                          GIFieldInfo *field_info,
                                          jsval        value);
 
-static struct JSClass gjs_boxed_class;
+extern struct JSClass gjs_boxed_class;
 
 GJS_DEFINE_PRIV_FROM_JS(Boxed, gjs_boxed_class)
 
@@ -925,7 +925,7 @@ to_string_func(JSContext *context,
  * reserved slot is used to hold onto the parent Javascript object and
  * make sure it doesn't get freed.
  */
-static struct JSClass gjs_boxed_class = {
+struct JSClass gjs_boxed_class = {
     "GObject_Boxed",
     JSCLASS_HAS_PRIVATE |
     JSCLASS_NEW_RESOLVE |
diff --git a/gi/function.cpp b/gi/function.cpp
index 9dbef7c..e967665 100644
--- a/gi/function.cpp
+++ b/gi/function.cpp
@@ -56,7 +56,7 @@ typedef struct {
     GIFunctionInvoker invoker;
 } Function;
 
-static struct JSClass gjs_function_class;
+extern struct JSClass gjs_function_class;
 
 /* Because we can't free the mmap'd data for a callback
  * while it's in use, this list keeps track of ones that
@@ -1355,7 +1355,7 @@ function_to_string (JSContext *context,
  * instances of the object, and to the prototype that instances of the
  * class have.
  */
-static struct JSClass gjs_function_class = {
+struct JSClass gjs_function_class = {
     "GIRepositoryFunction", /* means "new GIRepositoryFunction()" works */
     JSCLASS_HAS_PRIVATE,
     JS_PropertyStub,
diff --git a/gi/gerror.cpp b/gi/gerror.cpp
index 9eb3497..4bec86c 100644
--- a/gi/gerror.cpp
+++ b/gi/gerror.cpp
@@ -50,7 +50,7 @@ enum {
     PROP_MESSAGE
 };
 
-static struct JSClass gjs_error_class;
+extern struct JSClass gjs_error_class;
 
 static void define_error_properties(JSContext *, JSObject *);
 
@@ -305,7 +305,7 @@ error_constructor_value_of(JSContext *context, unsigned argc, jsval *vp)
  * instances of the object, and to the prototype that instances of the
  * class have.
  */
-static struct JSClass gjs_error_class = {
+struct JSClass gjs_error_class = {
     "GLib_Error",
     JSCLASS_HAS_PRIVATE |
     JSCLASS_NEW_RESOLVE,
diff --git a/gi/interface.cpp b/gi/interface.cpp
index ad39178..9b7da07 100644
--- a/gi/interface.cpp
+++ b/gi/interface.cpp
@@ -40,7 +40,7 @@ typedef struct {
     GType gtype;
 } Interface;
 
-static struct JSClass gjs_interface_class;
+extern struct JSClass gjs_interface_class;
 
 GJS_DEFINE_PRIV_FROM_JS(Interface, gjs_interface_class)
 
@@ -142,7 +142,7 @@ interface_new_resolve(JSContext *context,
     return ret;
 }
 
-static struct JSClass gjs_interface_class = {
+struct JSClass gjs_interface_class = {
     "GObject_Interface",
     JSCLASS_HAS_PRIVATE |
     JSCLASS_NEW_RESOLVE,
diff --git a/gi/keep-alive.cpp b/gi/keep-alive.cpp
index 4cb2a8d..d9d605d 100644
--- a/gi/keep-alive.cpp
+++ b/gi/keep-alive.cpp
@@ -44,7 +44,7 @@ typedef struct {
     unsigned int inside_trace : 1;
 } KeepAlive;
 
-static struct JSClass gjs_keep_alive_class;
+extern struct JSClass gjs_keep_alive_class;
 
 GJS_DEFINE_PRIV_FROM_JS(KeepAlive, gjs_keep_alive_class)
 
@@ -149,7 +149,7 @@ keep_alive_trace(JSTracer *tracer,
  * instances of the object, and to the prototype that instances of the
  * class have.
  */
-static struct JSClass gjs_keep_alive_class = {
+struct JSClass gjs_keep_alive_class = {
     "__private_GjsKeepAlive", /* means "new __private_GjsKeepAlive()" works */
     JSCLASS_HAS_PRIVATE,
     JS_PropertyStub,
diff --git a/gi/ns.cpp b/gi/ns.cpp
index 33aec80..0bcd4b8 100644
--- a/gi/ns.cpp
+++ b/gi/ns.cpp
@@ -40,7 +40,7 @@ typedef struct {
 
 } Ns;
 
-static struct JSClass gjs_ns_class;
+extern struct JSClass gjs_ns_class;
 
 GJS_DEFINE_PRIV_FROM_JS(Ns, gjs_ns_class)
 
@@ -153,7 +153,7 @@ ns_finalize(JSFreeOp *fop,
  * instances of the object, and to the prototype that instances of the
  * class have.
  */
-static struct JSClass gjs_ns_class = {
+struct JSClass gjs_ns_class = {
     "GIRepositoryNamespace",
     JSCLASS_HAS_PRIVATE |
     JSCLASS_NEW_RESOLVE,
diff --git a/gi/object.cpp b/gi/object.cpp
index 17498e5..dd85fd4 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -90,7 +90,7 @@ enum {
 static GSList *object_init_list;
 static GHashTable *class_init_properties;
 
-static struct JSClass gjs_object_instance_class;
+extern struct JSClass gjs_object_instance_class;
 static GThread *gjs_eval_thread;
 static volatile gint pending_idle_toggles;
 
@@ -1768,7 +1768,7 @@ to_string_func(JSContext *context,
     return ret;
 }
 
-static struct JSClass gjs_object_instance_class = {
+struct JSClass gjs_object_instance_class = {
     "GObject_Object",
     JSCLASS_HAS_PRIVATE |
     JSCLASS_NEW_RESOLVE,
diff --git a/gi/param.cpp b/gi/param.cpp
index 303cec4..e4a8ecf 100644
--- a/gi/param.cpp
+++ b/gi/param.cpp
@@ -40,7 +40,7 @@ typedef struct {
     GParamSpec *gparam; /* NULL if we are the prototype and not an instance */
 } Param;
 
-static struct JSClass gjs_param_class;
+extern struct JSClass gjs_param_class;
 
 GJS_DEFINE_PRIV_FROM_JS(Param, gjs_param_class)
 
@@ -427,7 +427,7 @@ param_new_internal(JSContext *cx,
  * instances of the object, and to the prototype that instances of the
  * class have.
  */
-static struct JSClass gjs_param_class = {
+struct JSClass gjs_param_class = {
     "GObject_ParamSpec",
     JSCLASS_HAS_PRIVATE,
     JS_PropertyStub,
diff --git a/gi/repo.cpp b/gi/repo.cpp
index 6338478..1153667 100644
--- a/gi/repo.cpp
+++ b/gi/repo.cpp
@@ -50,7 +50,7 @@ typedef struct {
 
 } Repo;
 
-static struct JSClass gjs_repo_class;
+extern struct JSClass gjs_repo_class;
 
 GJS_DEFINE_PRIV_FROM_JS(Repo, gjs_repo_class)
 
@@ -219,7 +219,7 @@ repo_finalize(JSFreeOp *fop,
  * instances of the object, and to the prototype that instances of the
  * class have.
  */
-static struct JSClass gjs_repo_class = {
+struct JSClass gjs_repo_class = {
     "GIRepository", /* means "new GIRepository()" works */
     JSCLASS_HAS_PRIVATE |
     JSCLASS_NEW_RESOLVE,
diff --git a/gi/union.cpp b/gi/union.cpp
index d634870..b8ea650 100644
--- a/gi/union.cpp
+++ b/gi/union.cpp
@@ -46,7 +46,7 @@ typedef struct {
     GType gtype;
 } Union;
 
-static struct JSClass gjs_union_class;
+extern struct JSClass gjs_union_class;
 
 GJS_DEFINE_PRIV_FROM_JS(Union, gjs_union_class)
 
@@ -307,7 +307,7 @@ to_string_func(JSContext *context,
  * instances of the object, and to the prototype that instances of the
  * class have.
  */
-static struct JSClass gjs_union_class = {
+struct JSClass gjs_union_class = {
     "GObject_Union",
     JSCLASS_HAS_PRIVATE |
     JSCLASS_NEW_RESOLVE,
diff --git a/gjs/byteArray.cpp b/gjs/byteArray.cpp
index 4597d68..9bd1e04 100644
--- a/gjs/byteArray.cpp
+++ b/gjs/byteArray.cpp
@@ -36,7 +36,7 @@ typedef struct {
     GBytes     *bytes;
 } ByteArrayInstance;
 
-static struct JSClass gjs_byte_array_class;
+extern struct JSClass gjs_byte_array_class;
 static struct JSObject* gjs_byte_array_prototype;
 GJS_DEFINE_PRIV_FROM_JS(ByteArrayInstance, gjs_byte_array_class)
 
@@ -54,7 +54,7 @@ static void   byte_array_finalize      (JSFreeOp     *fop,
                                         JSObject     *obj);
 
 
-static struct JSClass gjs_byte_array_class = {
+struct JSClass gjs_byte_array_class = {
     "ByteArray",
     JSCLASS_HAS_PRIVATE,
     JS_PropertyStub,
diff --git a/gjs/importer.cpp b/gjs/importer.cpp
index c0651e2..4f63c10 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -46,7 +46,7 @@ typedef struct {
     unsigned int index;
 } ImporterIterator;
 
-static struct JSClass gjs_importer_class;
+extern struct JSClass gjs_importer_class;
 
 GJS_DEFINE_PRIV_FROM_JS(Importer, gjs_importer_class)
 
@@ -989,7 +989,7 @@ importer_finalize(JSFreeOp *fop,
  * instances of the object, and to the prototype that instances of the
  * class have.
  */
-static struct JSClass gjs_importer_class = {
+struct JSClass gjs_importer_class = {
     "GjsFileImporter",
     JSCLASS_HAS_PRIVATE |
     JSCLASS_NEW_RESOLVE |


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