]> granicus.if.org Git - libexpat/commitdiff
Added new header for common internal definitions. These are all performance-
authorFred L. Drake, Jr. <fdrake@users.sourceforge.net>
Thu, 5 Sep 2002 01:56:29 +0000 (01:56 +0000)
committerFred L. Drake, Jr. <fdrake@users.sourceforge.net>
Thu, 5 Sep 2002 01:56:29 +0000 (01:56 +0000)
related at the moment.

expat/lib/internal.h [new file with mode: 0644]

diff --git a/expat/lib/internal.h b/expat/lib/internal.h
new file mode 100644 (file)
index 0000000..149ea3d
--- /dev/null
@@ -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