[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1795-gb0eb169 |
Date: |
Sat, 28 Sep 2013 19:46:05 +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 b0eb169eb5760cccb7ffb6ff7c331b661634a284 (commit)
from 1495f4fcc3033468bd3a8b53721297fc88275533 (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=b0eb169eb5760cccb7ffb6ff7c331b661634a284
commit b0eb169eb5760cccb7ffb6ff7c331b661634a284
Author: Sandro Santilli <address@hidden>
Date: Sat Sep 28 21:45:46 2013 +0200
Simplify SharedLib loading code
diff --git a/libbase/extension.cpp b/libbase/extension.cpp
index 45fab1d..3c2d70f 100644
--- a/libbase/extension.cpp
+++ b/libbase/extension.cpp
@@ -122,19 +122,16 @@ bool
Extension::initModule(const std::string& module, as_object &where)
{
- SharedLib *sl;
- std::string symbol(module);
-
- log_security(_("Initializing module: \"%s\" from %s"), symbol,
_pluginsdir);
+ log_security(_("Initializing module: \"%s\" from %s"), module,
_pluginsdir);
- if (_plugins[module] == 0) {
- sl = new SharedLib(_pluginsdir + "/" + module);
- sl->openLib();
- _plugins[module] = sl;
- } else {
- sl = _plugins[module];
- }
+ SharedLib *sl = _plugins[module];
+
+ if (sl == 0) {
+ sl = _plugins[module] = new SharedLib(_pluginsdir + "/" + module);
+ if ( ! sl->openLib() ) return false;
+ }
+ std::string symbol(module);
symbol.append("_class_init");
SharedLib::initentry *symptr = sl->getInitEntry(symbol);
@@ -154,17 +151,14 @@ Extension::initModuleWithFunc(const std::string& module,
{
// GNASH_REPORT_FUNCTION;
- SharedLib *sl;
-
log_security(_("Initializing module: \"%s\""), module);
- if (_plugins[module] == 0) {
- sl = new SharedLib(module);
- sl->openLib();
- _plugins[module] = sl;
- } else {
- sl = _plugins[module];
- }
+ SharedLib *sl = _plugins[module];
+
+ if (sl == 0) {
+ sl = _plugins[module] = new SharedLib(module);
+ if ( ! sl->openLib() ) return false;
+ }
SharedLib::initentry *symptr = sl->getInitEntry(func);
-----------------------------------------------------------------------
Summary of changes:
libbase/extension.cpp | 34 ++++++++++++++--------------------
1 files changed, 14 insertions(+), 20 deletions(-)
hooks/post-receive
--
Gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1795-gb0eb169,
Sandro Santilli <=