[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/movie_root.cpp server/mo...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/movie_root.cpp server/mo... |
Date: |
Sat, 21 Apr 2007 21:07:40 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/04/21 21:07:40
Modified files:
. : ChangeLog
server : movie_root.cpp movie_root.h sprite_instance.cpp
sprite_instance.h
server/asobj : LoadVars.cpp
Log message:
* server/: movie_root.{cpp,h}, sprite_instance.{cpp,h},
asobj/LoadVars.cpp: nuke ptr_list use so that boost 1.32
(version in Debian stable) is still usable.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2961&r2=1.2962
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.cpp?cvsroot=gnash&r1=1.57&r2=1.58
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.h?cvsroot=gnash&r1=1.48&r2=1.49
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.250&r2=1.251
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.h?cvsroot=gnash&r1=1.100&r2=1.101
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/LoadVars.cpp?cvsroot=gnash&r1=1.22&r2=1.23
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2961
retrieving revision 1.2962
diff -u -b -r1.2961 -r1.2962
--- ChangeLog 21 Apr 2007 07:05:41 -0000 1.2961
+++ ChangeLog 21 Apr 2007 21:07:39 -0000 1.2962
@@ -1,3 +1,9 @@
+2007-04-21 Sandro Santilli <address@hidden>
+
+ * server/: movie_root.{cpp,h}, sprite_instance.{cpp,h},
+ asobj/LoadVars.cpp: nuke ptr_list use so that boost 1.32
+ (version in Debian stable) is still usable.
+
2007-04-21 John Gilmore <address@hidden>
* plugin/plugin.cpp: In the child process, before executing
Index: server/movie_root.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.cpp,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -b -r1.57 -r1.58
--- server/movie_root.cpp 13 Apr 2007 07:35:55 -0000 1.57
+++ server/movie_root.cpp 21 Apr 2007 21:07:40 -0000 1.58
@@ -35,7 +35,6 @@
#include <string>
#include <typeinfo>
#include <cassert>
-#include <boost/ptr_container/ptr_list.hpp>
#include <boost/algorithm/string/case_conv.hpp>
using namespace std;
@@ -82,6 +81,12 @@
movie_root::~movie_root()
{
+ for (ActionQueue::iterator it=_actionQueue.begin(),
+ itE=_actionQueue.end();
+ it != itE; ++it)
+ {
+ delete *it;
+ }
assert(testInvariant());
}
@@ -808,7 +813,7 @@
// and a final call to .clear()
while ( ! _actionQueue.empty() )
{
- ExecutableCode& code = _actionQueue.front();
+ ExecutableCode& code = *(_actionQueue.front());
code.execute();
_actionQueue.pop_front();
}
@@ -823,7 +828,7 @@
void
movie_root::pushAction(std::auto_ptr<ExecutableCode> code)
{
- _actionQueue.push_back(code->clone());
+ _actionQueue.push_back(code.release());
}
void
Index: server/movie_root.h
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- server/movie_root.h 16 Apr 2007 18:23:05 -0000 1.48
+++ server/movie_root.h 21 Apr 2007 21:07:40 -0000 1.49
@@ -14,7 +14,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-/* $Id: movie_root.h,v 1.48 2007/04/16 18:23:05 strk Exp $ */
+/* $Id: movie_root.h,v 1.49 2007/04/21 21:07:40 strk Exp $ */
/// \page events_handling Handling of user events
///
@@ -77,8 +77,8 @@
#include "timers.h" // for composition
#include <vector>
+#include <list>
#include <set>
-#include <boost/ptr_container/ptr_list.hpp>
// Forward declarations
namespace gnash {
@@ -419,6 +419,12 @@
private:
+ /// Forbid copy
+ movie_root(const movie_root& ) { assert(0); }
+
+ /// Forbid assignment
+ movie_root& operator=(const movie_root& ) { assert(0); return *this; }
+
/// Notify the global Key ActionScript object about a key status change
void notify_global_key(key::code k, bool down);
@@ -433,7 +439,7 @@
///
boost::intrusive_ptr<Stage> getStageObject();
- typedef boost::ptr_list<ExecutableCode> ActionQueue;
+ typedef std::list<ExecutableCode*> ActionQueue;
ActionQueue _actionQueue;
Index: server/sprite_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v
retrieving revision 1.250
retrieving revision 1.251
diff -u -b -r1.250 -r1.251
--- server/sprite_instance.cpp 20 Apr 2007 15:03:24 -0000 1.250
+++ server/sprite_instance.cpp 21 Apr 2007 21:07:40 -0000 1.251
@@ -1566,6 +1566,12 @@
}
m_display_list.clear();
+
+ for (LoadVariablesThreads::iterator it=_loadVariableRequests.begin();
+ it != _loadVariableRequests.end(); ++it)
+ {
+ delete *it;
+ }
}
character* sprite_instance::get_character_at_depth(int depth)
@@ -3318,7 +3324,7 @@
}
_loadVariableRequests.push_back(new LoadVariablesThread(url));
- _loadVariableRequests.back().process();
+ _loadVariableRequests.back()->process();
//log_msg(_(SIZET_FMT " loadVariables requests pending"),
_loadVariableRequests.size());
}
@@ -3354,7 +3360,7 @@
for (LoadVariablesThreads::iterator it=_loadVariableRequests.begin();
it != _loadVariableRequests.end(); ++it)
{
- LoadVariablesThread& request = *it;
+ LoadVariablesThread& request = *(*it);
if ( request.completed() )
{
processCompletedLoadVariableRequest(request);
Index: server/sprite_instance.h
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.h,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -b -r1.100 -r1.101
--- server/sprite_instance.h 19 Apr 2007 17:41:36 -0000 1.100
+++ server/sprite_instance.h 21 Apr 2007 21:07:40 -0000 1.101
@@ -17,7 +17,7 @@
//
//
-/* $Id: sprite_instance.h,v 1.100 2007/04/19 17:41:36 udog Exp $ */
+/* $Id: sprite_instance.h,v 1.101 2007/04/21 21:07:40 strk Exp $ */
// Stateful live Sprite instance
@@ -41,7 +41,6 @@
#include <list>
#include <map>
#include <string>
-#include <boost/ptr_container/ptr_list.hpp>
// Forward declarations
namespace gnash {
@@ -739,6 +738,17 @@
private:
+ /// Forbid copy
+ sprite_instance(const sprite_instance&)
+ :
+ character(NULL, 0)
+ {
+ assert(0);
+ }
+
+ /// Forbid assignment
+ sprite_instance& operator=(const sprite_instance&) { assert(0); return
*this; }
+
/// \brief
/// Call has_keypress_event() or has_mouse_event()
/// if the given string correspond to an event handler
@@ -909,7 +919,7 @@
bool m_on_event_load_called;
/// List of loadVariables requests
- typedef boost::ptr_list<LoadVariablesThread> LoadVariablesThreads;
+ typedef std::list<LoadVariablesThread*> LoadVariablesThreads;
/// List of active loadVariable requests
//
Index: server/asobj/LoadVars.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/LoadVars.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- server/asobj/LoadVars.cpp 18 Apr 2007 11:00:29 -0000 1.22
+++ server/asobj/LoadVars.cpp 21 Apr 2007 21:07:40 -0000 1.23
@@ -122,6 +122,15 @@
private:
+ /// Forbid copy
+ LoadVars(const LoadVars&)
+ :
+ as_object()
+ { assert(0); }
+
+ /// Forbid assignment
+ LoadVars& operator=(const LoadVars&) { assert(0); return *this; }
+
/// Return enumerable property pairs in url-encoded form
//
/// TODO: move up to as_object and make public,
@@ -199,8 +208,8 @@
size_t _bytesLoaded;
/// List of load requests
- //typedef std::list<LoadVariablesThread> LoadVariablesThreads;
- typedef boost::ptr_list<LoadVariablesThread> LoadVariablesThreads;
+ typedef std::list<LoadVariablesThread*> LoadVariablesThreads;
+ //typedef boost::ptr_list<LoadVariablesThread> LoadVariablesThreads;
/// Load requests queue
//
@@ -240,15 +249,20 @@
LoadVars::~LoadVars()
{
//log_msg("Deleting LoadVars %p", this);
+ for ( LoadVariablesThreads::iterator i=_loadRequests.begin(),
e=_loadRequests.end();
+ i!=e; ++i)
+ {
+ delete *i;
+ }
}
void
LoadVars::checkLoads()
{
/// Process a completed load if any
- if ( isLoading() && _currentLoad->completed() )
+ if ( isLoading() && (*_currentLoad)->completed() )
{
- processLoaded(*_currentLoad);
+ processLoaded(*(*_currentLoad));
_loadRequests.pop_front();
_currentLoad = _loadRequests.end();
}
@@ -258,7 +272,7 @@
if ( ! _loadRequests.empty() )
{
_currentLoad = _loadRequests.begin();
- _currentLoad->process();
+ (*_currentLoad)->process();
}
else
{