[anjuta] project-wizard: JS template support and require GJS 0.6
- From: Maxim Ermilov <mermilov src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] project-wizard: JS template support and require GJS 0.6
- Date: Sat, 20 Mar 2010 19:02:40 +0000 (UTC)
commit 9f636f7199cf0ba8e423cba5047aa284b4093d6a
Author: Maxim Ermilov <zaspire rambler ru>
Date: Sat Mar 20 08:51:19 2010 +0300
project-wizard: JS template support and require GJS 0.6
.../templates/js_minimal/configure.ac.tpl | 2 +-
.../templates/js_minimal/src/debug.c | 10 +++-------
2 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/plugins/project-wizard/templates/js_minimal/configure.ac.tpl b/plugins/project-wizard/templates/js_minimal/configure.ac.tpl
index f81ab87..b711bff 100644
--- a/plugins/project-wizard/templates/js_minimal/configure.ac.tpl
+++ b/plugins/project-wizard/templates/js_minimal/configure.ac.tpl
@@ -16,7 +16,7 @@ AC_HEADER_STDC
PKG_CHECK_EXISTS([mozilla-js], [JS_PACKAGE=mozilla-js],
[PKG_CHECK_EXISTS([xulrunner-js], [JS_PACKAGE=xulrunner-js], [JS_PACKAGE=firefox-js])])
-PKG_CHECK_MODULES(GJS,gtk+-2.0 gjs-gi-1.0 $JS_PACKAGE)
+PKG_CHECK_MODULES(GJS,gtk+-2.0 gjs-gi-1.0 >= 0.6 $JS_PACKAGE)
## some flavors of Firefox .pc only set sdkdir, not libdir
FIREFOX_JS_SDKDIR=`$PKG_CONFIG --variable=sdkdir $JS_PACKAGE`
diff --git a/plugins/project-wizard/templates/js_minimal/src/debug.c b/plugins/project-wizard/templates/js_minimal/src/debug.c
index 442b4ed..c256b12 100644
--- a/plugins/project-wizard/templates/js_minimal/src/debug.c
+++ b/plugins/project-wizard/templates/js_minimal/src/debug.c
@@ -28,7 +28,6 @@
#include <jsapi.h>
#include <jsscript.h>
-#include <jscntxt.h>
#include <jsdbgapi.h>
#include <gio/gio.h>
@@ -54,9 +53,6 @@ gboolean stepover = FALSE;
gboolean stepout = FALSE;
GList *breakpoint = NULL;
-/*Missed in .h but exported*/
-extern JSContext *gjs_context_get_context(GjsContext * js_context);
-
static gchar *variable_get_desc(JSContext * cx, JSObject * obj);
static gchar *command_get();
static void send_reply(const gchar *a1);
@@ -484,10 +480,10 @@ debug_init(int *argc, char ***argv, GjsContext * context)
{
int i;
int flag;
- int port = 1235;
+ int port = 1235;
struct in_addr sip;
struct sockaddr_in ssa;
- JSContext *cx = gjs_context_get_context(context);
+ JSContext *cx = (JSContext *)gjs_context_get_native_context(context);
JSRuntime *rt = JS_GetRuntime(cx);
gchar *ip = NULL;
for (i = 0; i < *argc - 1; i++) {
@@ -500,7 +496,7 @@ debug_init(int *argc, char ***argv, GjsContext * context)
}
}
- g_assert (port > 0);
+ g_assert (port > 0);
if (ip == NULL)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]