port shell-js to c++

https://bugzilla.gnome.org/show_bug.cgi?id=711052
This commit is contained in:
Tim Lunn 2013-10-06 19:21:50 +11:00
parent dd44219aa5
commit e9fbbf4000
3 changed files with 3 additions and 2 deletions

View File

@ -16,6 +16,7 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
# Initialize libtool
LT_PREREQ([2.2.6])

View File

@ -207,7 +207,7 @@ endif HAVE_MUTTER_WAYLAND
libgnome_shell_js_la_SOURCES = \
shell-js.h \
shell-js.c \
shell-js.cpp \
$(NULL)
libgnome_shell_js_la_LIBADD = \

View File

@ -38,7 +38,7 @@ shell_js_add_extension_importer (const char *target_object_script,
* we should only ever have one context, so this
* should be alright. */
contexts = gjs_context_get_all ();
context = gjs_context_get_native_context (contexts->data);
context = (JSContext*) gjs_context_get_native_context ((GjsContext*)contexts->data);
g_list_free_full (contexts, g_object_unref);
JS_BeginRequest (context);