[gnome-shell] port shell-js to c++
- From: Tim Lunn <timl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] port shell-js to c++
- Date: Tue, 29 Oct 2013 20:45:28 +0000 (UTC)
commit e9fbbf40009cf3733ff5bbecdf2369bad8f1acb3
Author: Tim Lunn <tim feathertop org>
Date: Sun Oct 6 19:21:50 2013 +1100
port shell-js to c++
https://bugzilla.gnome.org/show_bug.cgi?id=711052
configure.ac | 1 +
src/Makefile.am | 2 +-
src/{shell-js.c => shell-js.cpp} | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index d149ff2..da937cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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])
diff --git a/src/Makefile.am b/src/Makefile.am
index 8041052..a9f4c62 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -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 = \
diff --git a/src/shell-js.c b/src/shell-js.cpp
similarity index 96%
rename from src/shell-js.c
rename to src/shell-js.cpp
index 149dcd0..7d057c9 100644
--- a/src/shell-js.c
+++ b/src/shell-js.cpp
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]