CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/08/02 16:07:28
Modified files:
. : ChangeLog
server : PropertyList.cpp
Log message:
* server/PropertyList.cpp: add compile-time macro for debugging
property allocations.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3913&r2=1.3914
http://cvs.savannah.gnu.org/viewcvs/gnash/server/PropertyList.cpp?cvsroot=gnash&r1=1.16&r2=1.17
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3913
retrieving revision 1.3914
diff -u -b -r1.3913 -r1.3914
--- ChangeLog 2 Aug 2007 07:54:33 -0000 1.3913
+++ ChangeLog 2 Aug 2007 16:07:28 -0000 1.3914
@@ -1,3 +1,8 @@
+2007-08-02 Sandro Santilli <[EMAIL PROTECTED]>
+
+ * server/PropertyList.cpp: add compile-time macro for debugging
+ property allocations.
+
2007-08-02 Udo Giacomozzi <[EMAIL PROTECTED]>
* gui/gtk_glue_agg.cpp: Warn when compiling for OLPC, change
compile-time
Index: server/PropertyList.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/PropertyList.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- server/PropertyList.cpp 1 Jul 2007 10:54:19 -0000 1.16
+++ server/PropertyList.cpp 2 Aug 2007 16:07:28 -0000 1.17
@@ -33,6 +33,9 @@
#include <utility> // for std::make_pair
+// Define the following to enable printing address of each property added
+//#define DEBUG_PROPERTY_ALLOC
+
namespace gnash {
PropertyList::PropertyList()
@@ -82,7 +85,11 @@
if ( found == _props.end() )
{
// create a new member
- _props[key] = new SimpleProperty(val);
+ SimpleProperty* prop = new SimpleProperty(val);
+#ifdef DEBUG_PROPERTY_ALLOC
+ log_debug("SimpleProperty %s = %p", key.c_str(), (void*)prop);
+#endif // DEBUG_PROPERTY_ALLOC
+ _props[key] = prop;
return true;
}
@@ -242,7 +249,11 @@
iterator found = _props.find( key );
if ( found != _props.end() ) return false; // already exists !!
- _props[key] = new GetterSetterProperty(GetterSetter(getter, setter));
+ GetterSetterProperty* prop = new
GetterSetterProperty(GetterSetter(getter, setter));
+#ifdef DEBUG_PROPERTY_ALLOC
+ log_debug("GetterSetterProperty %s = %p", key.c_str(), (void*)prop);
+#endif // DEBUG_PROPERTY_ALLOC
+ _props[key] = prop;
return true;
}
_______________________________________________
Gnash-commit mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-commit