Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 :
21 : #include <cstddef>
22 : #include <stdio.h>
23 :
24 : #include "cppu/macros.hxx"
25 :
26 : #include "osl/mutex.hxx"
27 :
28 : #include "constr.hxx"
29 : #include "destr.hxx"
30 : #include "copy.hxx"
31 : #include "assign.hxx"
32 : #include "eq.hxx"
33 :
34 : #include "boost/static_assert.hpp"
35 :
36 :
37 : using namespace ::cppu;
38 : using namespace ::osl;
39 : #if OSL_DEBUG_LEVEL > 1
40 : using namespace ::rtl;
41 : #endif
42 :
43 :
44 : namespace cppu
45 : {
46 :
47 : // Sequence<>() (default ctor) relies on this being static:
48 : uno_Sequence g_emptySeq = { 1, 0, { 0 } };
49 : typelib_TypeDescriptionReference * g_pVoidType = 0;
50 :
51 :
52 34528 : void * binuno_queryInterface( void * pUnoI, typelib_TypeDescriptionReference * pDestType )
53 : {
54 : // init queryInterface() td
55 : static typelib_TypeDescription * g_pQITD = 0;
56 34528 : if (0 == g_pQITD)
57 : {
58 281 : MutexGuard aGuard( Mutex::getGlobalMutex() );
59 281 : if (0 == g_pQITD)
60 : {
61 : typelib_TypeDescriptionReference * type_XInterface =
62 281 : * typelib_static_type_getByTypeClass( typelib_TypeClass_INTERFACE );
63 281 : typelib_InterfaceTypeDescription * pTXInterfaceDescr = 0;
64 281 : TYPELIB_DANGER_GET( (typelib_TypeDescription **) &pTXInterfaceDescr, type_XInterface );
65 : assert(pTXInterfaceDescr->ppAllMembers);
66 : typelib_typedescriptionreference_getDescription(
67 281 : &g_pQITD, pTXInterfaceDescr->ppAllMembers[ 0 ] );
68 281 : TYPELIB_DANGER_RELEASE( (typelib_TypeDescription *) pTXInterfaceDescr );
69 281 : }
70 : }
71 :
72 : uno_Any aRet, aExc;
73 34528 : uno_Any * pExc = &aExc;
74 : void * aArgs[ 1 ];
75 34528 : aArgs[ 0 ] = &pDestType;
76 : (*((uno_Interface *) pUnoI)->pDispatcher)(
77 34528 : (uno_Interface *) pUnoI, g_pQITD, &aRet, aArgs, &pExc );
78 :
79 34528 : uno_Interface * ret = 0;
80 34528 : if (0 == pExc)
81 : {
82 34528 : typelib_TypeDescriptionReference * ret_type = aRet.pType;
83 34528 : switch (ret_type->eTypeClass)
84 : {
85 : case typelib_TypeClass_VOID: // common case
86 0 : typelib_typedescriptionreference_release( ret_type );
87 0 : break;
88 : case typelib_TypeClass_INTERFACE:
89 : // tweaky... avoiding acquire/ release pair
90 34528 : typelib_typedescriptionreference_release( ret_type );
91 34528 : ret = (uno_Interface *) aRet.pReserved; // serving acquired interface
92 34528 : break;
93 : default:
94 0 : _destructAny( &aRet, 0 );
95 0 : break;
96 : }
97 : }
98 : else
99 : {
100 : #if OSL_DEBUG_LEVEL > 1
101 : OUStringBuffer buf( 128 );
102 : buf.append( "### exception occurred querying for interface " );
103 : buf.append( * reinterpret_cast< OUString const * >( &pDestType->pTypeName ) );
104 : buf.append( ": [" );
105 : buf.append( * reinterpret_cast< OUString const * >( &pExc->pType->pTypeName ) );
106 : buf.append( "] " );
107 : // Message is very first member
108 : buf.append( * reinterpret_cast< OUString const * >( pExc->pData ) );
109 : OString cstr(
110 : OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) );
111 : OSL_FAIL( cstr.getStr() );
112 : #endif
113 0 : uno_any_destruct( pExc, 0 );
114 : }
115 34528 : return ret;
116 : }
117 :
118 :
119 630207 : void defaultConstructStruct(
120 : void * pMem,
121 : typelib_CompoundTypeDescription * pCompType )
122 : {
123 630207 : _defaultConstructStruct( pMem, pCompType );
124 630207 : }
125 :
126 1810501 : void copyConstructStruct(
127 : void * pDest, void * pSource,
128 : typelib_CompoundTypeDescription * pTypeDescr,
129 : uno_AcquireFunc acquire, uno_Mapping * mapping )
130 : {
131 1810501 : _copyConstructStruct( pDest, pSource, pTypeDescr, acquire, mapping );
132 1810501 : }
133 :
134 2522773 : void destructStruct(
135 : void * pValue,
136 : typelib_CompoundTypeDescription * pTypeDescr,
137 : uno_ReleaseFunc release )
138 : {
139 2522773 : _destructStruct( pValue, pTypeDescr, release );
140 2522773 : }
141 :
142 518 : bool equalStruct(
143 : void * pDest, void *pSource,
144 : typelib_CompoundTypeDescription * pTypeDescr,
145 : uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release )
146 : {
147 518 : return _equalStruct( pDest, pSource, pTypeDescr, queryInterface, release );
148 : }
149 :
150 238832 : bool assignStruct(
151 : void * pDest, void * pSource,
152 : typelib_CompoundTypeDescription * pTypeDescr,
153 : uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release )
154 : {
155 238832 : return _assignStruct( pDest, pSource, pTypeDescr, queryInterface, acquire, release );
156 : }
157 :
158 :
159 20932972 : uno_Sequence * copyConstructSequence(
160 : uno_Sequence * pSource,
161 : typelib_TypeDescriptionReference * pElementType,
162 : uno_AcquireFunc acquire, uno_Mapping * mapping )
163 : {
164 20932972 : return icopyConstructSequence( pSource, pElementType, acquire, mapping );
165 : }
166 :
167 :
168 31720825 : void destructSequence(
169 : uno_Sequence * pSequence,
170 : typelib_TypeDescriptionReference * pType,
171 : typelib_TypeDescription * pTypeDescr,
172 : uno_ReleaseFunc release )
173 : {
174 31720825 : idestructSequence( pSequence, pType, pTypeDescr, release );
175 31720835 : }
176 :
177 :
178 2622 : bool equalSequence(
179 : uno_Sequence * pDest, uno_Sequence * pSource,
180 : typelib_TypeDescriptionReference * pElementType,
181 : uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release )
182 : {
183 2622 : return _equalSequence( pDest, pSource, pElementType, queryInterface, release );
184 : }
185 :
186 : extern "C"
187 : {
188 :
189 100955076 : CPPU_DLLPUBLIC void SAL_CALL uno_type_constructData(
190 : void * pMem, typelib_TypeDescriptionReference * pType )
191 : SAL_THROW_EXTERN_C()
192 : {
193 100955076 : _defaultConstructData( pMem, pType, 0 );
194 100955075 : }
195 :
196 668 : CPPU_DLLPUBLIC void SAL_CALL uno_constructData(
197 : void * pMem, typelib_TypeDescription * pTypeDescr )
198 : SAL_THROW_EXTERN_C()
199 : {
200 668 : _defaultConstructData( pMem, pTypeDescr->pWeakRef, pTypeDescr );
201 668 : }
202 :
203 269911706 : CPPU_DLLPUBLIC void SAL_CALL uno_type_destructData(
204 : void * pValue, typelib_TypeDescriptionReference * pType,
205 : uno_ReleaseFunc release )
206 : SAL_THROW_EXTERN_C()
207 : {
208 269911706 : _destructData( pValue, pType, 0, release );
209 269911716 : }
210 :
211 700922 : CPPU_DLLPUBLIC void SAL_CALL uno_destructData(
212 : void * pValue,
213 : typelib_TypeDescription * pTypeDescr,
214 : uno_ReleaseFunc release )
215 : SAL_THROW_EXTERN_C()
216 : {
217 700922 : _destructData( pValue, pTypeDescr->pWeakRef, pTypeDescr, release );
218 700922 : }
219 :
220 167732031 : CPPU_DLLPUBLIC void SAL_CALL uno_type_copyData(
221 : void * pDest, void * pSource,
222 : typelib_TypeDescriptionReference * pType,
223 : uno_AcquireFunc acquire )
224 : SAL_THROW_EXTERN_C()
225 : {
226 167732031 : _copyConstructData( pDest, pSource, pType, 0, acquire, 0 );
227 167732029 : }
228 :
229 377763 : CPPU_DLLPUBLIC void SAL_CALL uno_copyData(
230 : void * pDest, void * pSource,
231 : typelib_TypeDescription * pTypeDescr,
232 : uno_AcquireFunc acquire )
233 : SAL_THROW_EXTERN_C()
234 : {
235 377763 : _copyConstructData( pDest, pSource, pTypeDescr->pWeakRef, pTypeDescr, acquire, 0 );
236 377763 : }
237 :
238 1281556 : CPPU_DLLPUBLIC void SAL_CALL uno_type_copyAndConvertData(
239 : void * pDest, void * pSource,
240 : typelib_TypeDescriptionReference * pType,
241 : uno_Mapping * mapping )
242 : SAL_THROW_EXTERN_C()
243 : {
244 1281556 : _copyConstructData( pDest, pSource, pType, 0, 0, mapping );
245 1281556 : }
246 :
247 432647 : CPPU_DLLPUBLIC void SAL_CALL uno_copyAndConvertData(
248 : void * pDest, void * pSource,
249 : typelib_TypeDescription * pTypeDescr,
250 : uno_Mapping * mapping )
251 : SAL_THROW_EXTERN_C()
252 : {
253 432647 : _copyConstructData( pDest, pSource, pTypeDescr->pWeakRef, pTypeDescr, 0, mapping );
254 432647 : }
255 :
256 4906894 : CPPU_DLLPUBLIC sal_Bool SAL_CALL uno_type_equalData(
257 : void * pVal1, typelib_TypeDescriptionReference * pVal1Type,
258 : void * pVal2, typelib_TypeDescriptionReference * pVal2Type,
259 : uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release )
260 : SAL_THROW_EXTERN_C()
261 : {
262 : return _equalData(
263 : pVal1, pVal1Type, 0,
264 : pVal2, pVal2Type,
265 4906894 : queryInterface, release );
266 : }
267 :
268 0 : CPPU_DLLPUBLIC sal_Bool SAL_CALL uno_equalData(
269 : void * pVal1, typelib_TypeDescription * pVal1TD,
270 : void * pVal2, typelib_TypeDescription * pVal2TD,
271 : uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release )
272 : SAL_THROW_EXTERN_C()
273 : {
274 : return _equalData(
275 : pVal1, pVal1TD->pWeakRef, pVal1TD,
276 : pVal2, pVal2TD->pWeakRef,
277 0 : queryInterface, release );
278 : }
279 :
280 24825366 : CPPU_DLLPUBLIC sal_Bool SAL_CALL uno_type_assignData(
281 : void * pDest, typelib_TypeDescriptionReference * pDestType,
282 : void * pSource, typelib_TypeDescriptionReference * pSourceType,
283 : uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release )
284 : SAL_THROW_EXTERN_C()
285 : {
286 : return _assignData(
287 : pDest, pDestType, 0,
288 : pSource, pSourceType, 0,
289 24825366 : queryInterface, acquire, release );
290 : }
291 :
292 632 : CPPU_DLLPUBLIC sal_Bool SAL_CALL uno_assignData(
293 : void * pDest, typelib_TypeDescription * pDestTD,
294 : void * pSource, typelib_TypeDescription * pSourceTD,
295 : uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release )
296 : SAL_THROW_EXTERN_C()
297 : {
298 : return _assignData(
299 : pDest, pDestTD->pWeakRef, pDestTD,
300 : pSource, pSourceTD->pWeakRef, pSourceTD,
301 632 : queryInterface, acquire, release );
302 : }
303 :
304 191359 : CPPU_DLLPUBLIC sal_Bool SAL_CALL uno_type_isAssignableFromData(
305 : typelib_TypeDescriptionReference * pAssignable,
306 : void * pFrom, typelib_TypeDescriptionReference * pFromType,
307 : uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release )
308 : SAL_THROW_EXTERN_C()
309 : {
310 191359 : if (::typelib_typedescriptionreference_isAssignableFrom( pAssignable, pFromType ))
311 186373 : return sal_True;
312 4986 : if (typelib_TypeClass_INTERFACE != pFromType->eTypeClass ||
313 0 : typelib_TypeClass_INTERFACE != pAssignable->eTypeClass)
314 : {
315 4986 : return sal_False;
316 : }
317 :
318 : // query
319 0 : if (0 == pFrom)
320 0 : return sal_False;
321 0 : void * pInterface = *(void **)pFrom;
322 0 : if (0 == pInterface)
323 0 : return sal_False;
324 :
325 0 : if (0 == queryInterface)
326 0 : queryInterface = binuno_queryInterface;
327 0 : void * p = (*queryInterface)( pInterface, pAssignable );
328 0 : _release( p, release );
329 0 : return (0 != p);
330 : }
331 : }
332 :
333 :
334 :
335 :
336 :
337 :
338 :
339 : #if OSL_DEBUG_LEVEL > 1
340 :
341 : #if defined( SAL_W32)
342 : #pragma pack(push, 8)
343 : #endif
344 :
345 : // Why hardcode like this instead of using the (generated)
346 : // <sal/typesizes.h> ?
347 :
348 : #if (defined(INTEL) \
349 : && (defined(__GNUC__) && (defined(LINUX) || defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD)) \
350 : || defined(MACOSX) || defined(DRAGONFLY))) \
351 : || defined(IOS)
352 : #define MAX_ALIGNMENT_4
353 : #endif
354 :
355 : #define OFFSET_OF( s, m ) reinterpret_cast< size_t >((char *)&((s *)16)->m -16)
356 :
357 : #define BINTEST_VERIFY( c ) \
358 : if (! (c)) \
359 : { \
360 : fprintf( stderr, "### binary compatibility test failed: %s [line %d]!!!\n", #c, __LINE__ ); \
361 : abort(); \
362 : }
363 :
364 : #define BINTEST_VERIFYOFFSET( s, m, n ) \
365 : if (OFFSET_OF(s, m) != static_cast<size_t>(n)) \
366 : { \
367 : fprintf(stderr, "### OFFSET_OF(" #s ", " #m ") = %" SAL_PRI_SIZET "u instead of expected %" SAL_PRI_SIZET "u!!!\n", \
368 : OFFSET_OF(s, m), static_cast<size_t>(n)); \
369 : abort(); \
370 : }
371 :
372 : #define BINTEST_VERIFYSIZE( s, n ) \
373 : if (sizeof(s) != static_cast<size_t>(n)) \
374 : { \
375 : fprintf(stderr, "### sizeof(" #s ") = %" SAL_PRI_SIZET "u instead of expected %" SAL_PRI_SIZET "u!!!\n", \
376 : sizeof(s), static_cast<size_t>(n)); \
377 : abort(); \
378 : }
379 :
380 : struct C1
381 : {
382 : sal_Int16 n1;
383 : };
384 : struct C2 : public C1
385 : {
386 : sal_Int32 n2 CPPU_GCC3_ALIGN( C1 );
387 : };
388 : struct C3 : public C2
389 : {
390 : double d3;
391 : sal_Int32 n3;
392 : };
393 : struct C4 : public C3
394 : {
395 : sal_Int32 n4 CPPU_GCC3_ALIGN( C3 );
396 : double d4;
397 : };
398 : struct C5 : public C4
399 : {
400 : sal_Int64 n5;
401 : sal_Bool b5;
402 : };
403 : struct C6 : public C1
404 : {
405 : C5 c6 CPPU_GCC3_ALIGN( C1 );
406 : sal_Bool b6;
407 : };
408 :
409 : struct D
410 : {
411 : sal_Int16 d;
412 : sal_Int32 e;
413 : };
414 : struct E
415 : {
416 : sal_Bool a;
417 : sal_Bool b;
418 : sal_Bool c;
419 : sal_Int16 d;
420 : sal_Int32 e;
421 : };
422 :
423 : struct M
424 : {
425 : sal_Int32 n;
426 : sal_Int16 o;
427 : };
428 :
429 : struct N : public M
430 : {
431 : sal_Int16 p CPPU_GCC3_ALIGN( M );
432 : };
433 : struct N2
434 : {
435 : M m;
436 : sal_Int16 p;
437 : };
438 :
439 : struct O : public M
440 : {
441 : double p;
442 : sal_Int16 q;
443 : };
444 : struct O2 : public O
445 : {
446 : sal_Int16 p2 CPPU_GCC3_ALIGN( O );
447 : };
448 :
449 : struct P : public N
450 : {
451 : double p2;
452 : };
453 :
454 : struct empty
455 : {
456 : };
457 : struct second : public empty
458 : {
459 : int a;
460 : };
461 :
462 : struct AlignSize_Impl
463 : {
464 : sal_Int16 nInt16;
465 : double dDouble;
466 : };
467 :
468 : struct Char1
469 : {
470 : char c1;
471 : };
472 : struct Char2 : public Char1
473 : {
474 : char c2 CPPU_GCC3_ALIGN( Char1 );
475 : };
476 : struct Char3 : public Char2
477 : {
478 : char c3 CPPU_GCC3_ALIGN( Char2 );
479 : };
480 : struct Char4
481 : {
482 : Char3 chars;
483 : char c;
484 : };
485 : class Ref
486 : {
487 : void * p;
488 : };
489 : enum Enum
490 : {
491 : v = SAL_MAX_ENUM
492 : };
493 :
494 :
495 : class BinaryCompatible_Impl
496 : {
497 : public:
498 : BinaryCompatible_Impl();
499 : };
500 : BinaryCompatible_Impl::BinaryCompatible_Impl()
501 : {
502 : BOOST_STATIC_ASSERT( ((sal_Bool) true) == sal_True &&
503 : (1 != 0) == sal_True );
504 : BOOST_STATIC_ASSERT( ((sal_Bool) false) == sal_False &&
505 : (1 == 0) == sal_False );
506 : #ifdef MAX_ALIGNMENT_4
507 : // max alignment is 4
508 : BINTEST_VERIFYOFFSET( AlignSize_Impl, dDouble, 4 );
509 : BINTEST_VERIFYSIZE( AlignSize_Impl, 12 );
510 : #else
511 : // max alignment is 8
512 : BINTEST_VERIFYOFFSET( AlignSize_Impl, dDouble, 8 );
513 : BINTEST_VERIFYSIZE( AlignSize_Impl, 16 );
514 : #endif
515 :
516 : // sequence
517 : BINTEST_VERIFY( (SAL_SEQUENCE_HEADER_SIZE % 8) == 0 );
518 : // enum
519 : BINTEST_VERIFY( sizeof( Enum ) == sizeof( sal_Int32 ) );
520 : // any
521 : BINTEST_VERIFY( sizeof(void *) >= sizeof(sal_Int32) );
522 : BINTEST_VERIFY( sizeof( uno_Any ) == sizeof( void * ) * 3 );
523 : BINTEST_VERIFYOFFSET( uno_Any, pType, 0 );
524 : BINTEST_VERIFYOFFSET( uno_Any, pData, 1 * sizeof (void *) );
525 : BINTEST_VERIFYOFFSET( uno_Any, pReserved, 2 * sizeof (void *) );
526 : // interface
527 : BINTEST_VERIFY( sizeof( Ref ) == sizeof( void * ) );
528 : // string
529 : BINTEST_VERIFY( sizeof( OUString ) == sizeof( rtl_uString * ) );
530 : // struct
531 : BINTEST_VERIFYSIZE( M, 8 );
532 : BINTEST_VERIFYOFFSET( M, o, 4 );
533 : BINTEST_VERIFYSIZE( N, 12 );
534 : BINTEST_VERIFYOFFSET( N, p, 8 );
535 : BINTEST_VERIFYSIZE( N2, 12 );
536 : BINTEST_VERIFYOFFSET( N2, p, 8 );
537 : #ifdef MAX_ALIGNMENT_4
538 : BINTEST_VERIFYSIZE( O, 20 );
539 : #else
540 : BINTEST_VERIFYSIZE( O, 24 );
541 : #endif
542 : BINTEST_VERIFYSIZE( D, 8 );
543 : BINTEST_VERIFYOFFSET( D, e, 4 );
544 : BINTEST_VERIFYOFFSET( E, d, 4 );
545 : BINTEST_VERIFYOFFSET( E, e, 8 );
546 :
547 : BINTEST_VERIFYSIZE( C1, 2 );
548 : BINTEST_VERIFYSIZE( C2, 8 );
549 : BINTEST_VERIFYOFFSET( C2, n2, 4 );
550 :
551 : #ifdef MAX_ALIGNMENT_4
552 : BINTEST_VERIFYSIZE( C3, 20 );
553 : BINTEST_VERIFYOFFSET( C3, d3, 8 );
554 : BINTEST_VERIFYOFFSET( C3, n3, 16 );
555 : BINTEST_VERIFYSIZE( C4, 32 );
556 : BINTEST_VERIFYOFFSET( C4, n4, 20 );
557 : BINTEST_VERIFYOFFSET( C4, d4, 24 );
558 : BINTEST_VERIFYSIZE( C5, 44 );
559 : BINTEST_VERIFYOFFSET( C5, n5, 32 );
560 : BINTEST_VERIFYOFFSET( C5, b5, 40 );
561 : BINTEST_VERIFYSIZE( C6, 52 );
562 : BINTEST_VERIFYOFFSET( C6, c6, 4 );
563 : BINTEST_VERIFYOFFSET( C6, b6, 48 );
564 :
565 : BINTEST_VERIFYSIZE( O2, 24 );
566 : BINTEST_VERIFYOFFSET( O2, p2, 20 );
567 : #else
568 : BINTEST_VERIFYSIZE( C3, 24 );
569 : BINTEST_VERIFYOFFSET( C3, d3, 8 );
570 : BINTEST_VERIFYOFFSET( C3, n3, 16 );
571 : BINTEST_VERIFYSIZE( C4, 40 );
572 : BINTEST_VERIFYOFFSET( C4, n4, 24 );
573 : BINTEST_VERIFYOFFSET( C4, d4, 32 );
574 : BINTEST_VERIFYSIZE( C5, 56 );
575 : BINTEST_VERIFYOFFSET( C5, n5, 40 );
576 : BINTEST_VERIFYOFFSET( C5, b5, 48 );
577 : BINTEST_VERIFYSIZE( C6, 72 );
578 : BINTEST_VERIFYOFFSET( C6, c6, 8 );
579 : BINTEST_VERIFYOFFSET( C6, b6, 64 );
580 :
581 : BINTEST_VERIFYSIZE( O2, 32 );
582 : BINTEST_VERIFYOFFSET( O2, p2, 24 );
583 : #endif
584 :
585 : BINTEST_VERIFYSIZE( Char3, 3 );
586 : BINTEST_VERIFYOFFSET( Char4, c, 3 );
587 :
588 : #ifdef MAX_ALIGNMENT_4
589 : // max alignment is 4
590 : BINTEST_VERIFYSIZE( P, 20 );
591 : #else
592 : // alignment of P is 8, because of P[] ...
593 : BINTEST_VERIFYSIZE( P, 24 );
594 : BINTEST_VERIFYSIZE( second, sizeof( int ) );
595 : #endif
596 : }
597 :
598 : #ifdef SAL_W32
599 : # pragma pack(pop)
600 : #endif
601 :
602 : static BinaryCompatible_Impl aTest;
603 :
604 : #endif
605 :
606 : }
607 :
608 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|