[gjs] Move GjsConstString to jsapi-util.h



commit 70cfbd3619593182462f77cd322e3c35baeb03c5
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Jan 15 10:43:45 2014 -0500

    Move GjsConstString to jsapi-util.h

 gi/arg.cpp                  |    1 -
 gi/boxed.cpp                |    1 -
 gi/closure.cpp              |    1 -
 gi/function.cpp             |    1 -
 gi/gerror.cpp               |    1 -
 gi/interface.cpp            |    1 -
 gi/keep-alive.cpp           |    1 -
 gi/object.cpp               |    1 -
 gi/param.cpp                |    1 -
 gi/repo.cpp                 |    1 -
 gi/union.cpp                |    1 -
 gi/value.cpp                |    1 -
 gjs/importer.cpp            |    1 -
 gjs/jsapi-dynamic-class.cpp |    1 -
 gjs/jsapi-util.cpp          |    1 -
 gjs/jsapi-util.h            |   39 +++++++++++++++++++++++++++++++--------
 gjs/native.cpp              |    1 -
 gjs/runtime.h               |   24 ------------------------
 18 files changed, 31 insertions(+), 48 deletions(-)
---
diff --git a/gi/arg.cpp b/gi/arg.cpp
index fa9afe1..b13c412 100644
--- a/gi/arg.cpp
+++ b/gi/arg.cpp
@@ -35,7 +35,6 @@
 #include "gjs/byteArray.h"
 #include <gjs/gjs-module.h>
 #include <gjs/compat.h>
-#include <gjs/runtime.h>
 
 #include <util/log.h>
 
diff --git a/gi/boxed.cpp b/gi/boxed.cpp
index 8f7acf1..4fcda3b 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -30,7 +30,6 @@
 #include "object.h"
 #include <gjs/gjs-module.h>
 #include <gjs/compat.h>
-#include <gjs/runtime.h>
 #include "repo.h"
 #include "proxyutils.h"
 #include "function.h"
diff --git a/gi/closure.cpp b/gi/closure.cpp
index 4058c26..e780739 100644
--- a/gi/closure.cpp
+++ b/gi/closure.cpp
@@ -31,7 +31,6 @@
 #include "keep-alive.h"
 #include <gjs/gjs-module.h>
 #include <gjs/compat.h>
-#include <gjs/runtime.h>
 
 typedef struct {
     GClosure base;
diff --git a/gi/function.cpp b/gi/function.cpp
index 87bd4da..c574af6 100644
--- a/gi/function.cpp
+++ b/gi/function.cpp
@@ -29,7 +29,6 @@
 #include "boxed.h"
 #include "union.h"
 #include "gerror.h"
-#include <gjs/runtime.h>
 #include <gjs/gjs-module.h>
 #include <gjs/compat.h>
 
diff --git a/gi/gerror.cpp b/gi/gerror.cpp
index b27370c..0856955 100644
--- a/gi/gerror.cpp
+++ b/gi/gerror.cpp
@@ -27,7 +27,6 @@
 
 #include <gjs/gjs-module.h>
 #include <gjs/compat.h>
-#include <gjs/runtime.h>
 #include "boxed.h"
 #include "enumeration.h"
 #include "repo.h"
diff --git a/gi/interface.cpp b/gi/interface.cpp
index e2707e8..f8d75b9 100644
--- a/gi/interface.cpp
+++ b/gi/interface.cpp
@@ -30,7 +30,6 @@
 
 #include <gjs/gjs-module.h>
 #include <gjs/compat.h>
-#include <gjs/runtime.h>
 #include <util/log.h>
 
 #include <girepository.h>
diff --git a/gi/keep-alive.cpp b/gi/keep-alive.cpp
index 8470a23..6c2172d 100644
--- a/gi/keep-alive.cpp
+++ b/gi/keep-alive.cpp
@@ -27,7 +27,6 @@
 
 #include <gjs/gjs-module.h>
 #include <gjs/compat.h>
-#include <gjs/runtime.h>
 
 #include <util/log.h>
 #include <util/glib.h>
diff --git a/gi/object.cpp b/gi/object.cpp
index af35c4d..511b28b 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -42,7 +42,6 @@
 #include <gjs/gjs-module.h>
 #include <gjs/compat.h>
 #include <gjs/type-module.h>
-#include <gjs/runtime.h>
 
 #include <util/log.h>
 #include <util/hash-x32.h>
diff --git a/gi/param.cpp b/gi/param.cpp
index 7983d34..3286238 100644
--- a/gi/param.cpp
+++ b/gi/param.cpp
@@ -32,7 +32,6 @@
 #include "gtype.h"
 #include <gjs/gjs-module.h>
 #include <gjs/compat.h>
-#include <gjs/runtime.h>
 
 #include <util/log.h>
 
diff --git a/gi/repo.cpp b/gi/repo.cpp
index 30e398e..fef7eae 100644
--- a/gi/repo.cpp
+++ b/gi/repo.cpp
@@ -37,7 +37,6 @@
 #include "gerror.h"
 
 #include <gjs/compat.h>
-#include <gjs/runtime.h>
 
 #include <util/log.h>
 #include <util/misc.h>
diff --git a/gi/union.cpp b/gi/union.cpp
index 6c63658..8364473 100644
--- a/gi/union.cpp
+++ b/gi/union.cpp
@@ -33,7 +33,6 @@
 #include "object.h"
 #include <gjs/gjs-module.h>
 #include <gjs/compat.h>
-#include <gjs/runtime.h>
 #include "repo.h"
 #include "proxyutils.h"
 #include "function.h"
diff --git a/gi/value.cpp b/gi/value.cpp
index e783457..475fc90 100644
--- a/gi/value.cpp
+++ b/gi/value.cpp
@@ -37,7 +37,6 @@
 #include "gerror.h"
 #include <gjs/gjs-module.h>
 #include <gjs/compat.h>
-#include <gjs/runtime.h>
 
 #include <girepository.h>
 
diff --git a/gjs/importer.cpp b/gjs/importer.cpp
index e8bcc65..55a1c4b 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -29,7 +29,6 @@
 #include <gjs/gjs-module.h>
 #include <gjs/importer.h>
 #include <gjs/compat.h>
-#include <gjs/runtime.h>
 
 #include <gio/gio.h>
 
diff --git a/gjs/jsapi-dynamic-class.cpp b/gjs/jsapi-dynamic-class.cpp
index 49381ba..d7cfe2e 100644
--- a/gjs/jsapi-dynamic-class.cpp
+++ b/gjs/jsapi-dynamic-class.cpp
@@ -31,7 +31,6 @@
 #include "jsapi-util.h"
 #include "compat.h"
 #include "jsapi-private.h"
-#include "runtime.h"
 
 #include <string.h>
 #include <math.h>
diff --git a/gjs/jsapi-util.cpp b/gjs/jsapi-util.cpp
index 3087937..049f58a 100644
--- a/gjs/jsapi-util.cpp
+++ b/gjs/jsapi-util.cpp
@@ -32,7 +32,6 @@
 #include "jsapi-util.h"
 #include "compat.h"
 #include "jsapi-private.h"
-#include "runtime.h"
 #include <gi/boxed.h>
 
 #include <string.h>
diff --git a/gjs/jsapi-util.h b/gjs/jsapi-util.h
index 053bb0d..880eb92 100644
--- a/gjs/jsapi-util.h
+++ b/gjs/jsapi-util.h
@@ -201,12 +201,6 @@ gboolean    gjs_object_require_property      (JSContext       *context,
                                               const char      *obj_description,
                                               jsid             property_name,
                                               jsval           *value_p);
-/* This one is defined in runtime.c, so the compiler can optimize the call
-   to get_const_string() it uses. */
-gboolean    gjs_object_get_property_const    (JSContext       *context,
-                                              JSObject        *obj,
-                                              GjsConstString   property_name,
-                                              jsval           *value_p);
 
 JSObject   *gjs_new_object_for_constructor   (JSContext       *context,
                                               JSClass         *clasp,
@@ -390,8 +384,37 @@ JSBool            gjs_eval_with_scope        (JSContext    *context,
                                               const char   *filename,
                                               jsval        *retval_p,
                                               GError      **error);
-jsid              gjs_context_get_const_string (JSContext       *context,
-                                                GjsConstString   string);
+
+typedef enum {
+  GJS_STRING_CONSTRUCTOR,
+  GJS_STRING_PROTOTYPE,
+  GJS_STRING_LENGTH,
+  GJS_STRING_IMPORTS,
+  GJS_STRING_PARENT_MODULE,
+  GJS_STRING_MODULE_INIT,
+  GJS_STRING_SEARCH_PATH,
+  GJS_STRING_KEEP_ALIVE_MARKER,
+  GJS_STRING_PRIVATE_NS_MARKER,
+  GJS_STRING_GI_MODULE,
+  GJS_STRING_GI_VERSIONS,
+  GJS_STRING_GI_OVERRIDES,
+  GJS_STRING_GOBJECT_INIT,
+  GJS_STRING_NEW_INTERNAL,
+  GJS_STRING_NEW,
+  GJS_STRING_MESSAGE,
+  GJS_STRING_CODE,
+  GJS_STRING_STACK,
+  GJS_STRING_FILENAME,
+  GJS_STRING_LINE_NUMBER,
+  GJS_STRING_LAST
+} GjsConstString;
+
+jsid              gjs_context_get_const_string  (JSContext       *context,
+                                                 GjsConstString   string);
+gboolean          gjs_object_get_property_const (JSContext       *context,
+                                                 JSObject        *obj,
+                                                 GjsConstString   property_name,
+                                                 jsval           *value_p);
 
 const char * gjs_strip_unix_shebang(const char *script,
                                     gssize     *script_len,
diff --git a/gjs/native.cpp b/gjs/native.cpp
index ad1c648..65a528b 100644
--- a/gjs/native.cpp
+++ b/gjs/native.cpp
@@ -30,7 +30,6 @@
 #include "native.h"
 #include "compat.h"
 #include "jsapi-util.h"
-#include "runtime.h"
 
 static GHashTable *modules = NULL;
 
diff --git a/gjs/runtime.h b/gjs/runtime.h
index 7bbba32..5991d51 100644
--- a/gjs/runtime.h
+++ b/gjs/runtime.h
@@ -24,30 +24,6 @@
 #ifndef __GJS_RUNTIME_H__
 #define __GJS_RUNTIME_H__
 
-typedef enum {
-  GJS_STRING_CONSTRUCTOR,
-  GJS_STRING_PROTOTYPE,
-  GJS_STRING_LENGTH,
-  GJS_STRING_IMPORTS,
-  GJS_STRING_PARENT_MODULE,
-  GJS_STRING_MODULE_INIT,
-  GJS_STRING_SEARCH_PATH,
-  GJS_STRING_KEEP_ALIVE_MARKER,
-  GJS_STRING_PRIVATE_NS_MARKER,
-  GJS_STRING_GI_MODULE,
-  GJS_STRING_GI_VERSIONS,
-  GJS_STRING_GI_OVERRIDES,
-  GJS_STRING_GOBJECT_INIT,
-  GJS_STRING_NEW_INTERNAL,
-  GJS_STRING_NEW,
-  GJS_STRING_MESSAGE,
-  GJS_STRING_CODE,
-  GJS_STRING_STACK,
-  GJS_STRING_FILENAME,
-  GJS_STRING_LINE_NUMBER,
-  GJS_STRING_LAST
-} GjsConstString;
-
 void        gjs_runtime_init_for_context     (JSRuntime       *runtime,
                                               JSContext       *context);
 void        gjs_runtime_deinit               (JSRuntime       *runtime);


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