[Libreoffice-commits] .: 3 commits - bridges/prj bridges/source cppu/source cppu/util
Tor Lillqvist
tml at kemper.freedesktop.org
Sat Jan 22 15:10:19 PST 2011
bridges/prj/d.lst | 1 +
bridges/source/cpp_uno/msvc_win32_x86-64/makefile.mk | 2 +-
cppu/source/typelib/typelib.cxx | 19 +++++++++++++++++++
cppu/source/uno/data.cxx | 13 -------------
cppu/util/target.pmk | 4 ++++
5 files changed, 25 insertions(+), 14 deletions(-)
New commits:
commit a9eb49a9ad0f3aa8bee6ff536c0256b948f31dd1
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Sun Jan 23 01:01:28 2011 +0200
If CPPU_LEAK_STATIC_DATA is defined, don't bother with assertions
Re-introduce the possibility to define CPPU_LEAK_STATIC_DATA. This
time use it to bypass just the assertions that check that the type
description counts really are zero at the end of the
TypeDescriptor_Init_Impl destructor.
Add more informative debugging printout of which counts are non-zero.
Define CPPU_LEAK_STATIC_DATA for x64 Windows for now. But we do get
the same assertions also on x86 Windows if cppu is built with
OSL_DEBUG_LEVEL>1.
diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index dd2f38b..4e22da6 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -29,6 +29,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_cppu.hxx"
+#if OSL_DEBUG_LEVEL > 1
+#include <stdio.h>
+#endif
+
#include <hash_map>
#include <list>
#include <set>
@@ -335,7 +339,21 @@ TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl() SAL_THROW( () )
delete pWeakMap;
pWeakMap = 0;
}
+#ifndef CPPU_LEAK_STATIC_DATA
#if OSL_DEBUG_LEVEL > 1
+#define MYASSERT(x) if (x != 0) fprintf(stderr, "### "#x" = %d, should be zero!!!\n", x);
+ MYASSERT (nTypeDescriptionCount );
+ MYASSERT( nCompoundTypeDescriptionCount );
+ MYASSERT( nUnionTypeDescriptionCount );
+ MYASSERT( nIndirectTypeDescriptionCount );
+ MYASSERT( nArrayTypeDescriptionCount );
+ MYASSERT( nEnumTypeDescriptionCount );
+ MYASSERT( nInterfaceMethodTypeDescriptionCount );
+ MYASSERT( nInterfaceAttributeTypeDescriptionCount );
+ MYASSERT( nInterfaceTypeDescriptionCount );
+ MYASSERT( nTypeDescriptionReferenceCount );
+#undef MYASSERT
+
OSL_ASSERT( nTypeDescriptionCount == 0 );
OSL_ASSERT( nCompoundTypeDescriptionCount == 0 );
OSL_ASSERT( nUnionTypeDescriptionCount == 0 );
@@ -351,6 +369,7 @@ TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl() SAL_THROW( () )
#endif
delete pCallbacks;
pCallbacks = 0;
+#endif // CPPU_LEAK_STATIC_DATA
if( pMutex )
{
diff --git a/cppu/util/target.pmk b/cppu/util/target.pmk
index 3befcb1..a94ea7c 100644
--- a/cppu/util/target.pmk
+++ b/cppu/util/target.pmk
@@ -51,3 +51,7 @@ CFLAGS += -Ob0
.ENDIF
.ENDIF
+
+.IF "$(COM)$(CPU)" == "MSCX"
+CFLAGS += -DCPPU_LEAK_STATIC_DATA
+.ENDIF
commit 8bf1ce17bc554c329c2902be394720709df8168d
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Sat Jan 22 21:43:57 2011 +0200
Use correct name for mscx_uno.dll and deliver it
diff --git a/bridges/prj/d.lst b/bridges/prj/d.lst
index 0b3dd93..f7d8aef 100644
--- a/bridges/prj/d.lst
+++ b/bridges/prj/d.lst
@@ -16,6 +16,7 @@ mkdir: %_DEST%\inc%_EXT%\bridges\remote
..\%__SRC%\class\java_uno*.jar %_DEST%\bin%_EXT%\java_uno*.jar
..\%__SRC%\bin\msci_uno.* %_DEST%\bin%_EXT%\msci_uno.*
+..\%__SRC%\bin\mscx_uno.* %_DEST%\bin%_EXT%\mscx_uno.*
..\%__SRC%\bin\gcc3_uno.dll %_DEST%\bin%_EXT%\gcc3_uno.dll
..\%__SRC%\lib\libgcc2_uno.* %_DEST%\lib%_EXT%\libgcc2_uno.*
..\%__SRC%\lib\libgcc3_uno.* %_DEST%\lib%_EXT%\libgcc3_uno.*
diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/makefile.mk b/bridges/source/cpp_uno/msvc_win32_x86-64/makefile.mk
index 6fff82f..604799a 100644
--- a/bridges/source/cpp_uno/msvc_win32_x86-64/makefile.mk
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/makefile.mk
@@ -28,7 +28,7 @@
PRJ=..$/..$/..
PRJNAME=bridges
-TARGET=msci_uno
+TARGET=mscx_uno
LIBTARGET=no
ENABLE_EXCEPTIONS=TRUE
commit 980fca5ba60083e3ab15dee5a511f0a8fd3351fa
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Sat Jan 22 21:14:56 2011 +0200
Remove pointless debugging output
We do print out a message if struct size verifications fail. That is
enough. No point in printing out the same
> sizeof(AlignSize_Impl) = 16
> sizeof(M) = 8
> sizeof(N) = 12
etc messages every time a cppu-using program is run and cppu has been
built for debugging.
diff --git a/cppu/source/uno/data.cxx b/cppu/source/uno/data.cxx
index 7830124..901b27b 100644
--- a/cppu/source/uno/data.cxx
+++ b/cppu/source/uno/data.cxx
@@ -373,21 +373,8 @@ sal_Bool SAL_CALL uno_type_isAssignableFromData(
#define BINTEST_VERIFYOFFSET( s, m, n ) \
if (OFFSET_OF(s, m) != n) { fprintf( stderr, "### OFFSET_OF(" #s ", " #m ") = %d instead of expected %d!!!\n", OFFSET_OF(s, m), n ); abort(); }
-#if OSL_DEBUG_LEVEL > 1
-#if defined(__GNUC__) && (defined(LINUX) || defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD)) && \
- (defined(INTEL) || defined(POWERPC) || defined(X86_64) || defined(S390))
-#define BINTEST_VERIFYSIZE( s, n ) \
- fprintf( stderr, "> sizeof(" #s ") = %d; __alignof__ (" #s ") = %d\n", sizeof(s), __alignof__ (s) ); \
- if (sizeof(s) != n) { fprintf( stderr, "### sizeof(" #s ") = %d instead of expected %d!!!\n", sizeof(s), n ); abort(); }
-#else // ! GNUC
#define BINTEST_VERIFYSIZE( s, n ) \
- fprintf( stderr, "> sizeof(" #s ") = %d\n", sizeof(s) ); \
if (sizeof(s) != n) { fprintf( stderr, "### sizeof(" #s ") = %d instead of expected %d!!!\n", sizeof(s), n ); abort(); }
-#endif
-#else // ! OSL_DEBUG_LEVEL
-#define BINTEST_VERIFYSIZE( s, n ) \
- if (sizeof(s) != n) { fprintf( stderr, "### sizeof(" #s ") = %d instead of expected %d!!!\n", sizeof(s), n ); abort(); }
-#endif
struct C1
{
More information about the Libreoffice-commits
mailing list