[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r11407: Clean up Boolean, make its c
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r11407: Clean up Boolean, make its constructor non-static. |
Date: |
Tue, 11 Aug 2009 15:01:01 +0200 |
User-agent: |
Bazaar (1.16.1) |
------------------------------------------------------------
revno: 11407
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Tue 2009-08-11 15:01:01 +0200
message:
Clean up Boolean, make its constructor non-static.
modified:
libcore/asobj/Boolean_as.cpp
=== modified file 'libcore/asobj/Boolean_as.cpp'
--- a/libcore/asobj/Boolean_as.cpp 2009-08-11 09:16:57 +0000
+++ b/libcore/asobj/Boolean_as.cpp 2009-08-11 13:01:01 +0000
@@ -38,7 +38,6 @@
as_value boolean_valueof(const fn_call& fn);
as_value boolean_ctor(const fn_call& fn);
void attachBooleanInterface(as_object& o);
- as_object* getBooleanClass(Global_as& g);
as_object* getBooleanInterface();
}
@@ -68,31 +67,22 @@
};
// extern (used by Global.cpp)
-void boolean_class_init(as_object& global, const ObjectURI& uri)
+void
+boolean_class_init(as_object& where, const ObjectURI& uri)
{
// This is going to be the global Boolean "class"/"function"
- boost::intrusive_ptr<as_object> cl = getBooleanClass(*getGlobal(global));
+ as_object* proto = getBooleanInterface();
+ Global_as* gl = getGlobal(where);
+ as_object* cl = gl->createClass(&boolean_ctor, proto);
// Register _global.Boolean
- global.init_member(getName(uri), cl.get(), as_object::DefaultFlags,
+ where.init_member(getName(uri), cl, as_object::DefaultFlags,
getNamespace(uri));
}
namespace {
-as_object*
-getBooleanClass(Global_as& g)
-{
- static as_object* cl = 0;
-
- if (!cl) {
- as_object* proto = getBooleanInterface();
- cl = g.createClass(&boolean_ctor, proto);
- VM::get().addStatic(cl);
- }
- return cl;
-}
void
attachBooleanInterface(as_object& o)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r11407: Clean up Boolean, make its constructor non-static.,
Benjamin Wolsey <=