summaryrefslogtreecommitdiff
path: root/lib/internal.h
diff options
context:
space:
mode:
authorfdrake <fdrake>2002-09-05 01:56:29 +0000
committerfdrake <fdrake>2002-09-05 01:56:29 +0000
commitb611a3be9b4a8eb9944b8ff7da2c41bf1e05d28c (patch)
tree9854626faf608ac7ce5e6e25a8aee1b770538c1d /lib/internal.h
parent605ace7791f9965f4eb3cb42d297fc26043ec6a5 (diff)
downloadlibexpat-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.h37
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