summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2003-03-19 15:55:44 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2003-03-19 15:55:44 +0000
commit5023a134727f0bfcf08aeb3a706a9f27be81a598 (patch)
treece607ff935046efe96fc4fddc3effadcb9e5789f
parentdba2c425d51ca2d15c6a15755559b3e1c924a6a2 (diff)
MWS_SRX644: migrate branch mws_srx644 -> HEAD
-rw-r--r--cppu/inc/cppu/macros.hxx6
-rw-r--r--cppu/inc/typelib/typeclass.h18
-rw-r--r--cppu/source/typelib/typelib.cxx37
-rw-r--r--cppu/source/uno/data.cxx8
-rw-r--r--cppu/test/alignment/diagnose.h6
-rw-r--r--cppu/test/makefile.mk8
6 files changed, 55 insertions, 28 deletions
diff --git a/cppu/inc/cppu/macros.hxx b/cppu/inc/cppu/macros.hxx
index 043a8b645..d1fd226f9 100644
--- a/cppu/inc/cppu/macros.hxx
+++ b/cppu/inc/cppu/macros.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: macros.hxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: dbo $ $Date: 2002-10-23 10:40:56 $
+ * last change: $Author: hr $ $Date: 2003-03-19 16:55:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -76,7 +76,7 @@
the struct inherits from a base struct the first member is no double or [unsigned] long long.
@internal
*/
-#if defined(__GNUC__) && defined(LINUX) && (defined(INTEL) || defined(POWERPC) || defined(X86_64)) && (__GNUC__ == 3)
+#if defined(__GNUC__) && (defined(LINUX) || defined(FREEBSD)) && (defined(INTEL) || defined(POWERPC) || defined(X86_64) || defined(S390)) && (__GNUC__ == 3)
#define CPPU_GCC3_ALIGN( base_struct ) __attribute__ ((aligned (__alignof__ (base_struct))))
#else
#define CPPU_GCC3_ALIGN( base_struct )
diff --git a/cppu/inc/typelib/typeclass.h b/cppu/inc/typelib/typeclass.h
index 813149bbe..70d5a7797 100644
--- a/cppu/inc/typelib/typeclass.h
+++ b/cppu/inc/typelib/typeclass.h
@@ -2,9 +2,9 @@
*
* $RCSfile: typeclass.h,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: dbo $ $Date: 2001-08-21 09:17:07 $
+ * last change: $Author: hr $ $Date: 2003-03-19 16:55:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -105,13 +105,13 @@ typedef enum _typelib_TypeClass
typelib_TypeClass_TYPEDEF = 16,
/** type class of struct */
typelib_TypeClass_STRUCT = 17,
- /** type class of union */
+ /** type class of union (not implemented) */
typelib_TypeClass_UNION = 18,
/** type class of exception */
typelib_TypeClass_EXCEPTION = 19,
/** type class of sequence */
typelib_TypeClass_SEQUENCE = 20,
- /** type class of array */
+ /** type class of array (not implemented) */
typelib_TypeClass_ARRAY = 21,
/** type class of interface */
typelib_TypeClass_INTERFACE = 22,
@@ -123,8 +123,16 @@ typedef enum _typelib_TypeClass
typelib_TypeClass_INTERFACE_METHOD = 25,
/** type class of interface attribute */
typelib_TypeClass_INTERFACE_ATTRIBUTE = 26,
- /** type class of unknown */
+ /** type class of unknown type */
typelib_TypeClass_UNKNOWN = 27,
+ /** type class of properties */
+ typelib_TypeClass_PROPERTY = 28,
+ /** type class of constants */
+ typelib_TypeClass_CONSTANT = 29,
+ /** type class of constants groups */
+ typelib_TypeClass_CONSTANTS = 30,
+ /** type class of singletons */
+ typelib_TypeClass_SINGLETON = 31,
/** fixing enum size */
typelib_TypeClass_MAKE_FIXED_SIZE = SAL_MAX_ENUM
} typelib_TypeClass;
diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index 38d3e1abd..3455488d6 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: typelib.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: dbo $ $Date: 2001-10-11 14:11:24 $
+ * last change: $Author: hr $ $Date: 2003-03-19 16:55:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1224,9 +1224,9 @@ extern "C" void SAL_CALL typelib_typedescription_release(
typelib_TypeDescription * pTD )
SAL_THROW_EXTERN_C()
{
- OSL_ASSERT(pTD->nRefCount > 0);
-
- if( ! ::osl_decrementInterlockedCount( &pTD->nRefCount ) )
+ sal_Int32 ref = ::osl_decrementInterlockedCount( &pTD->nRefCount );
+ OSL_ASSERT(ref >= 0);
+ if (0 == ref)
{
if( reallyWeak( pTD->eTypeClass ) )
{
@@ -1685,11 +1685,30 @@ extern "C" void SAL_CALL typelib_typedescription_getByName(
}
typelib_typedescriptionreference_release( pTDR );
}
-
- if( !*ppRet )
+
+ if (0 == *ppRet)
{
- // on demand access
- aInit.callChain( ppRet, pName );
+ // check for sequence
+ OUString const & name = *reinterpret_cast< OUString const * >( &pName );
+ if (2 < name.getLength() && '[' == name[ 0 ])
+ {
+ OUString element_name( name.copy( 2 ) );
+ typelib_TypeDescription * element_td = 0;
+ typelib_typedescription_getByName( &element_td, element_name.pData );
+ if (0 != element_td)
+ {
+ typelib_typedescription_new(
+ ppRet, typelib_TypeClass_SEQUENCE, pName, element_td->pWeakRef, 0, 0 );
+ // register?
+ typelib_typedescription_release( element_td );
+ }
+ }
+ if (0 == *ppRet)
+ {
+ // on demand access
+ aInit.callChain( ppRet, pName );
+ }
+
if( *ppRet )
{
// typedescription found
diff --git a/cppu/source/uno/data.cxx b/cppu/source/uno/data.cxx
index f94c6ffa1..38046daf7 100644
--- a/cppu/source/uno/data.cxx
+++ b/cppu/source/uno/data.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: data.cxx,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: dbo $ $Date: 2002-10-23 10:40:57 $
+ * last change: $Author: hr $ $Date: 2003-03-19 16:55:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -353,7 +353,7 @@ sal_Bool SAL_CALL uno_type_isAssignableFromData(
# pragma pack(8)
#endif
-#if defined(__GNUC__) && defined(LINUX) && defined(INTEL)
+#if defined(__GNUC__) && (defined(LINUX) || defined(FREEBSD)) && defined(INTEL)
#define MAX_ALIGNMENT_4
#endif
@@ -365,7 +365,7 @@ sal_Bool SAL_CALL uno_type_isAssignableFromData(
if (OFFSET_OF(s, m) != n) { fprintf( stderr, "### OFFSET_OF(" #s ", " #m ") = %d instead of expected %d!!!\n", OFFSET_OF(s, m), n ); abort(); }
#ifdef CPPU_ASSERTIONS
-#if defined(__GNUC__) && defined(LINUX) && (defined(INTEL) || defined(POWERPC) || defined(X86_64))
+#if defined(__GNUC__) && (defined(LINUX) || defined(FREEBSD)) && (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(); }
diff --git a/cppu/test/alignment/diagnose.h b/cppu/test/alignment/diagnose.h
index 097a37407..db282d68f 100644
--- a/cppu/test/alignment/diagnose.h
+++ b/cppu/test/alignment/diagnose.h
@@ -2,9 +2,9 @@
*
* $RCSfile: diagnose.h,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: dbo $ $Date: 2002-08-21 09:19:38 $
+ * last change: $Author: hr $ $Date: 2003-03-19 16:55:44 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -64,7 +64,7 @@
#include <sal/types.h>
#include <stdio.h>
-#if defined(__GNUC__) && defined(LINUX) && defined(INTEL)
+#if defined(__GNUC__) && (defined(LINUX) || defined(FREEBSD)) && defined(INTEL)
#define ALIGNMENT(s, n) __alignof__ (s)
#else
#define ALIGNMENT(s, n) n
diff --git a/cppu/test/makefile.mk b/cppu/test/makefile.mk
index 2d61d9369..afae014bd 100644
--- a/cppu/test/makefile.mk
+++ b/cppu/test/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.26 $
+# $Revision: 1.27 $
#
-# last change: $Author: dbo $ $Date: 2002-04-24 13:43:27 $
+# last change: $Author: hr $ $Date: 2003-03-19 16:55:43 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -147,6 +147,7 @@ TYPES:= -Ttest.XLanguageBindingTest \
-Tcom.sun.star.lang.XServiceInfo \
-Tcom.sun.star.lang.XEventListener \
-Tcom.sun.star.lang.XTypeProvider \
+ -Tcom.sun.star.lang.DisposedException \
-Tcom.sun.star.registry.XSimpleRegistry \
-Tcom.sun.star.registry.XRegistryKey \
-Tcom.sun.star.loader.XImplementationLoader \
@@ -163,8 +164,7 @@ TYPES:= -Ttest.XLanguageBindingTest \
-Tcom.sun.star.beans.XPropertySet \
-Tcom.sun.star.reflection.XIdlClassProvider \
-Tcom.sun.star.container.XHierarchicalNameAccess \
- -Tcom.sun.star.uno.XCurrentContext \
- -Tcom.sun.star.lang.DisposedException
+ -Tcom.sun.star.uno.XCurrentContext
$(BIN)$/testcppu.rdb: $(ALLIDLFILES)
+idlc -I$(PRJ) -I$(SOLARIDLDIR) -O$(BIN) $?