[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-
From: |
Bastiaan Jacques |
Subject: |
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-407-g271c28d |
Date: |
Sat, 26 Mar 2011 22:00:49 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".
The branch, master has been updated
via 271c28d6e1faee00175e22e99bcb5e76db23fc56 (commit)
via 6c1330972076905d61dde88e60e821dab94b4251 (commit)
from 09e32a863caff3e85ebc7db9edbdbc0d6a2d4c2e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=271c28d6e1faee00175e22e99bcb5e76db23fc56
commit 271c28d6e1faee00175e22e99bcb5e76db23fc56
Author: Bastiaan Jacques <address@hidden>
Date: Sat Mar 26 22:58:58 2011 +0100
Allow --disable-extensions to disable loading extensions to avoid
the dependency on libltdl.
diff --git a/configure.ac b/configure.ac
index 93abb6b..fe24e58 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1128,16 +1128,20 @@ ext_lirc=no
ext_dbus=no
ext_all=no
extensions_list=
+extensions_support=yes
nextensions=0
AC_ARG_ENABLE(extensions,
- AC_HELP_STRING([--enable-extensions=], [Specify which extensions to build]),
+ AC_HELP_STRING([--enable-extensions=], [Specify which extensions to build
(default: none)])
+ AC_HELP_STRING([--disable-extensions], [Disable support for extensions
entirely]),
if test -n ${enableval}; then
if test "x${enableval}" != "xno"; then
extlist="${enableval}"
enableval=`echo ${enableval} | tr '\054' ' ' `
+ AC_DEFINE([USE_EXTENSIONS], [1], [Specify that extension support is
enabled.])
else
extlist=""
enableval=""
+ extensions_support=no
fi
fi
nextensions=0
@@ -1217,6 +1221,8 @@ AM_CONDITIONAL(BUILD_LIRC_EXT, [ test x$ext_lirc = xyes ])
AM_CONDITIONAL(BUILD_DBUS_EXT, [ test x$ext_dbus = xyes ])
AM_CONDITIONAL(BUILD_EXTENSIONS, [ test -n "$extensions_list"])
+AM_CONDITIONAL(ENABLE_EXTENSIONS, [ test "x${extensions_support}" != "xno" ])
+
dnl --------------------------------------------------------
dnl Libtool
dnl --------------------------------------------------------
@@ -3669,10 +3675,13 @@ if test x"$has_ltdl" = x"yes";then
echo " LIBLTDL flags are: $LTDL_CFLAGS"
echo " LIBLTDL libs are: $LTDL_LIBS"
else
- echo " ERROR: No libltdl development package is installed" >&3
- echo " Install it from ftp://ftp.gnu.org/gnu/libtool/" >&3
- echo " or .deb users: apt-get install libltdl-dev" >&3
- echo " or .rpm users: yum install libtool-ltdl-devel" >&3
+ if test x"${extensions_support}" != xno; then
+ echo " ERROR: No libltdl development package is installed," >&3
+ echo " yet --disable-extensions was not specified." >&3
+ echo " Install it from ftp://ftp.gnu.org/gnu/libtool/" >&3
+ echo " or .deb users: apt-get install libltdl-dev" >&3
+ echo " or .rpm users: yum install libtool-ltdl-devel" >&3
+ fi
fi
if test x"$python" = x"yes"; then
@@ -3759,6 +3768,10 @@ if test x"${extensions_list}" != x; then
echo " Building extensions: ${extensions_list}"
fi
+if test x"${extensions_support}" = xno; then
+ echo " Extension support disabled."
+fi
+
if test x"${security_list}" != x; then
echo " Enabling security features: ${security_list}"
fi
diff --git a/libbase/Makefile.am b/libbase/Makefile.am
index 8e7a14f..66c0bb7 100644
--- a/libbase/Makefile.am
+++ b/libbase/Makefile.am
@@ -59,7 +59,6 @@ libgnashbase_la_LIBADD = \
$(NULL)
libgnashbase_la_SOURCES = \
- extension.cpp \
$(MALLOC) \
GnashImage.cpp \
SWFCtype.cpp \
@@ -70,7 +69,6 @@ libgnashbase_la_SOURCES = \
log.cpp \
memory.cpp \
rc.cpp \
- sharedlib.cpp \
string_table.cpp \
tu_file.cpp \
IOChannel.cpp \
@@ -105,6 +103,10 @@ endif
endif
endif
+if ENABLE_EXTENSIONS
+libgnashbase_la_SOURCES += extension.cpp sharedlib.cpp
+endif
+
edit = sed \
-e 's|@address@hidden|$(DEFAULT_FLASH_PLATFORM_ID)|g' \
-e 's|@address@hidden|$(DEFAULT_FLASH_MAJOR_VERSION)|g' \
@@ -152,13 +154,11 @@ noinst_HEADERS =
inst_HEADERS = \
accumulator.h \
SimpleBuffer.h \
- extension.h \
GnashNumeric.h \
jemtree.h \
GnashSleep.h \
gmemory.h \
SharedMem.h \
- sharedlib.h \
tree.hh \
tu_file.h \
IOChannel.h \
@@ -188,6 +188,10 @@ if USE_GIF
noinst_HEADERS += GnashImageGif.h
endif
+if ENABLE_EXTENSIONS
+inst_HEADERS += extension.h sharedlib.h
+endif
+
EXTENSIONS_API = \
StringPredicates.h \
Stats.h \
diff --git a/libbase/extension.cpp b/libbase/extension.cpp
index 877c598..45f29ef 100644
--- a/libbase/extension.cpp
+++ b/libbase/extension.cpp
@@ -101,11 +101,6 @@ Extension::Extension(const std::string& dir)
#endif
}
-Extension::~Extension()
-{
-// GNASH_REPORT_FUNCTION;
-}
-
bool
Extension::scanAndLoad(const std::string& dir, as_object &obj)
{
diff --git a/libbase/extension.h b/libbase/extension.h
index 6397b70..7a1456d 100644
--- a/libbase/extension.h
+++ b/libbase/extension.h
@@ -23,9 +23,12 @@
#include <vector>
#include <string>
#include <boost/tokenizer.hpp>
-#include "sharedlib.h"
#include "dsodefs.h"
+namespace gnash {
+ class SharedLib;
+}
+
namespace gnash
{
@@ -41,7 +44,7 @@ public:
Extension(const std::string& dir);
- ~Extension();
+ ~Extension() {}
/// Scan a directory for Gnash modules
bool scanDir();
diff --git a/libcore/asobj/Global_as.cpp b/libcore/asobj/Global_as.cpp
index 356ff48..1509215 100644
--- a/libcore/asobj/Global_as.cpp
+++ b/libcore/asobj/Global_as.cpp
@@ -144,7 +144,9 @@ namespace {
Global_as::Global_as(VM& vm)
:
as_object(vm),
+#ifdef USE_EXTENSIONS
_et(new Extension()),
+#endif
_classes(this, _et.get()),
_objectProto(new as_object(*this))
{
@@ -322,13 +324,14 @@ createObject(const Global_as& gl)
void
Global_as::loadExtensions()
{
- if (RcInitFile::getDefaultInstance().enableExtensions()) {
+#if USE_EXTENSIONS
+ if (_et.get() && RcInitFile::getDefaultInstance().enableExtensions()) {
log_security(_("Extensions enabled, scanning plugin dir for load"));
_et->scanAndLoad(*this);
+ return;
}
- else {
- log_security(_("Extensions disabled"));
- }
+#endif
+ log_security(_("Extensions disabled"));
}
void
http://git.savannah.gnu.org/cgit//commit/?id=6c1330972076905d61dde88e60e821dab94b4251
commit 6c1330972076905d61dde88e60e821dab94b4251
Author: Bastiaan Jacques <address@hidden>
Date: Sat Mar 26 22:57:14 2011 +0100
Remove extension class loading logic that's not used.
diff --git a/libcore/ClassHierarchy.cpp b/libcore/ClassHierarchy.cpp
index 177898a..13a102e 100644
--- a/libcore/ClassHierarchy.cpp
+++ b/libcore/ClassHierarchy.cpp
@@ -56,45 +56,6 @@ addVisibilityFlag(int& flags, int version)
}
}
-class declare_extension_function : public as_function
-{
-private:
- ClassHierarchy::ExtensionClass _decl;
- as_object *mTarget;
- Extension *mExtension;
-
-public:
- bool isBuiltin() { return true; }
-
- declare_extension_function(ClassHierarchy::ExtensionClass &c, as_object *g,
- Extension* e)
- :
- as_function(getGlobal(*g)),
- _decl(c),
- mTarget(g),
- mExtension(e)
- {
- }
-
- virtual as_value call(const fn_call& fn)
- {
- string_table& st = getStringTable(fn);
- log_debug("Loading extension class %s", st.value(getName(_decl.uri)));
-
- if (mExtension->initModuleWithFunc(_decl.file_name,
- _decl.init_name, *mTarget))
- {
- // Successfully loaded it, now find it, set its proto, and return.
- as_value us;
- mTarget->get_member(_decl.uri, &us);
- return us;
- }
- // Error here -- not successful in loading.
- log_error("Could not load class %s", st.value(getName(_decl.uri)));
- return as_value();
- }
-};
-
class declare_native_function : public as_function
{
@@ -147,18 +108,6 @@ ClassHierarchy::~ClassHierarchy()
}
bool
-ClassHierarchy::declareClass(ExtensionClass& c)
-{
- if (!mExtension) return false;
-
- as_function* getter(new declare_extension_function(c, mGlobal,
mExtension));
-
- int flags = PropFlags::dontEnum;
- addVisibilityFlag(flags, c.version);
- return mGlobal->init_destructive_property(c.uri, *getter, flags);
-}
-
-bool
ClassHierarchy::declareClass(const NativeClass& c)
{
as_function* getter = new declare_native_function(c, mGlobal);
diff --git a/libcore/ClassHierarchy.h b/libcore/ClassHierarchy.h
index a8980d4..59b6ea7 100644
--- a/libcore/ClassHierarchy.h
+++ b/libcore/ClassHierarchy.h
@@ -101,14 +101,6 @@ public:
typedef std::vector<NativeClass> NativeClasses;
- /// Declare an ActionScript class, with information on how to load it.
- ///
- /// @param c
- /// The ExtensionClass structure which defines the class.
- ///
- /// @return true, unless the class with c.name already existed.
- bool declareClass(ExtensionClass& c);
-
/// Declare an ActionScript class and how to instantiate it from the
core.
///
/// @param c
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 23 +++++++++++++++----
libbase/Makefile.am | 12 ++++++---
libbase/extension.cpp | 5 ----
libbase/extension.h | 7 ++++-
libcore/ClassHierarchy.cpp | 51 -------------------------------------------
libcore/ClassHierarchy.h | 8 ------
libcore/asobj/Global_as.cpp | 11 ++++++---
7 files changed, 38 insertions(+), 79 deletions(-)
hooks/post-receive
--
Gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-407-g271c28d,
Bastiaan Jacques <=