[Scummvm-cvs-logs] CVS: scummvm/common scummsys.h,1.25,1.26 main.cpp,1.28,1.29
Max Horn
fingolfin at users.sourceforge.net
Wed May 21 13:36:17 CEST 2003
Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1:/tmp/cvs-serv18352
Modified Files:
scummsys.h main.cpp
Log Message:
don't inline free_check to make debugging easier
Index: scummsys.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/scummsys.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- scummsys.h 21 May 2003 18:45:58 -0000 1.25
+++ scummsys.h 21 May 2003 20:35:48 -0000 1.26
@@ -437,14 +437,8 @@
// Since 'new' now returns a memory block inited to 0xE7E7E7E7 we might
// get some invocations of free() with that param. We check for those here.
// That allows us to set a debugger breakpoint to catch it.
-inline void free_check(void *ptr) {
- if ((uint)ptr == 0xE7E7E7E7UL) {
- printf("ERROR: freeing 0xE7E7E7E7\n");
- exit(1);
- }
- free(ptr);
-}
#define free(x) free_check(x)
+void free_check(void *ptr);
#endif
#endif
Index: main.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/main.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- main.cpp 21 May 2003 16:56:45 -0000 1.28
+++ main.cpp 21 May 2003 20:35:48 -0000 1.29
@@ -240,4 +240,13 @@
void operator delete(void *ptr) {
free(ptr);
}
+
+#undef free(x)
+void free_check(void *ptr) {
+ if ((uint)ptr == 0xE7E7E7E7UL) {
+ printf("ERROR: freeing 0xE7E7E7E7\n");
+ exit(1);
+ }
+ free(ptr);
+}
#endif
More information about the Scummvm-git-logs
mailing list