]> git.saurik.com Git - wxWidgets.git/blob - src/expat/lib/internal.h
wxCocoa: Added preliminary Blit support
[wxWidgets.git] / src / expat / lib / internal.h
1 /* internal.h
2
3 Internal definitions used by Expat. This is not needed to compile
4 client code.
5
6 The following calling convention macros are defined for frequently
7 called functions:
8
9 FASTCALL - Used for those internal functions that have a simple
10 body and a low number of arguments and local variables.
11
12 PTRCALL - Used for functions called though function pointers.
13
14 PTRFASTCALL - Like PTRCALL, but for low number of arguments.
15
16 inline - Used for selected internal functions for which inlining
17 may improve performance on some platforms.
18
19 Note: Use of these macros is based on judgement, not hard rules,
20 and therefore subject to change.
21 */
22
23 #if defined(__GNUC__)
24 /* Instability reported with egcs on a RedHat Linux 7.3.
25 Let's comment it out:
26 #define FASTCALL __attribute__((stdcall, regparm(3)))
27 and let's try this:
28 */
29 #define FASTCALL __attribute__((regparm(3)))
30 #define PTRCALL
31 #define PTRFASTCALL __attribute__((regparm(3)))
32
33 #elif defined(WIN32)
34 /* Using __fastcall seems to have an unexpected negative effect under
35 MS VC++, especially for function pointers, so we won't use it for
36 now on that platform. It may be reconsidered for a future release
37 if it can be made more effective.
38 Likely reason: __fastcall on Windows is like stdcall, therefore
39 the compiler cannot perform stack optimizations for call clusters.
40 */
41 #ifdef FASTCALL
42 #undef FASTCALL
43 #endif
44 #define FASTCALL
45 #define PTRCALL
46 #define PTRFASTCALL
47
48 #endif
49
50 #ifndef FASTCALL
51 #define FASTCALL
52 #endif
53
54 #ifndef PTRCALL
55 #define PTRCALL
56 #endif
57
58 #ifndef PTRFASTCALL
59 #define PTRFASTCALL
60 #endif
61
62 #ifndef XML_MIN_SIZE
63 #if !defined(__cplusplus) && !defined(inline)
64 #ifdef __GNUC__
65 #define inline __inline
66 #endif /* __GNUC__ */
67 #endif
68 #endif /* XML_MIN_SIZE */
69
70 #ifdef __cplusplus
71 #define inline inline
72 #else
73 #ifndef inline
74 #define inline
75 #endif
76 #endif