summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-11-11 15:03:20 -0500
committerColin Walters <walters@verbum.org>2010-12-03 16:03:32 -0500
commitf833e1b287d9ee1a3bc1c19257fb15dbf4a9ba0b (patch)
treef2b4a8b3894b6bdd54941269eb3c96f2ffe250b2
parent3a94a5e36287072486831eb68bfe43a0e1c8ea78 (diff)
downloadgobject-introspection-f833e1b287d9ee1a3bc1c19257fb15dbf4a9ba0b.tar.gz
cmph: Modify types to use GLib types
The 64 bit #ifdefs is just hackish and broken; e.g. it will fail on ppc64/linux and WIN64. Use the GLib typedefs, which I know are more correct.
-rw-r--r--girepository/cmph/cmph_types.h37
1 files changed, 10 insertions, 27 deletions
diff --git a/girepository/cmph/cmph_types.h b/girepository/cmph/cmph_types.h
index 40f43329..28832358 100644
--- a/girepository/cmph/cmph_types.h
+++ b/girepository/cmph/cmph_types.h
@@ -1,36 +1,19 @@
+#include <glib.h>
+
#ifndef __CMPH_TYPES_H__
#define __CMPH_TYPES_H__
-typedef char cmph_int8;
-typedef unsigned char cmph_uint8;
-
-typedef short cmph_int16;
-typedef unsigned short cmph_uint16;
+typedef gint8 cmph_int8;
+typedef guint8 cmph_uint8;
-typedef int cmph_int32;
-typedef unsigned int cmph_uint32;
+typedef gint16 cmph_int16;
+typedef guint16 cmph_uint16;
-#if defined(__ia64) || defined(__x86_64__)
- /** \typedef long cmph_int64;
- * \brief 64-bit integer for a 64-bit achitecture.
- */
- typedef long cmph_int64;
+typedef gint32 cmph_int32;
+typedef guint32 cmph_uint32;
- /** \typedef unsigned long cmph_uint64;
- * \brief Unsigned 64-bit integer for a 64-bit achitecture.
- */
- typedef unsigned long cmph_uint64;
-#else
- /** \typedef long long cmph_int64;
- * \brief 64-bit integer for a 32-bit achitecture.
- */
- typedef long long cmph_int64;
-
- /** \typedef unsigned long long cmph_uint64;
- * \brief Unsigned 64-bit integer for a 32-bit achitecture.
- */
- typedef unsigned long long cmph_uint64;
-#endif
+typedef gint64 cmph_int64;
+typedef guint64 cmph_uint64;
typedef enum { CMPH_HASH_JENKINS, CMPH_HASH_COUNT } CMPH_HASH;
extern const char *cmph_hash_names[];