diff options
author | fdrake <fdrake> | 2002-09-05 01:56:29 +0000 |
---|---|---|
committer | fdrake <fdrake> | 2002-09-05 01:56:29 +0000 |
commit | b611a3be9b4a8eb9944b8ff7da2c41bf1e05d28c (patch) | |
tree | 9854626faf608ac7ce5e6e25a8aee1b770538c1d /lib/internal.h | |
parent | 605ace7791f9965f4eb3cb42d297fc26043ec6a5 (diff) | |
download | libexpat-b611a3be9b4a8eb9944b8ff7da2c41bf1e05d28c.tar.gz |
Added new header for common internal definitions. These are all performance-
related at the moment.
Diffstat (limited to 'lib/internal.h')
-rw-r--r-- | lib/internal.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/internal.h b/lib/internal.h new file mode 100644 index 0000000..149ea3d --- /dev/null +++ b/lib/internal.h @@ -0,0 +1,37 @@ +/* internal.h + + Internal definitions used by Expat. This is not needed to compile + client code. + + The following definitions are made: + + FASTCALL -- Used for most internal functions to specify that the + fastest possible calling convention be used. + + inline -- Used for selected internal functions for which inlining + may improve performance on some platforms. +*/ + +#if defined(__GNUC__) +#define FASTCALL __attribute__((stdcall, regparm(3))) +#elif defined(WIN32) +#define FASTCALL __fastcall +#else +#define FASTCALL +#endif + +#ifndef XML_MIN_SIZE +#if !defined(__cplusplus) && !defined(inline) +#ifdef __GNUC__ +#define inline __inline +#endif /* __GNUC__ */ +#endif +#endif /* XML_MIN_SIZE */ + +#ifdef __cplusplus +#define inline inline +#else +#ifndef inline +#define inline +#endif +#endif |