Wed Feb 24 15:47:16 CET 2010 Paolo Molaro <lupus@ximian.com>
[mono.git] / mono / utils / mono-publib.h
1 #ifndef __MONO_PUBLIB_H__
2 #define __MONO_PUBLIB_H__
3
4 /* 
5  * Minimal general purpose header for use in public mono header files.
6  * We can't include config.h, so we use compiler-specific preprocessor
7  * directives where needed.
8  */
9
10 #ifdef  __cplusplus
11 #define MONO_BEGIN_DECLS  extern "C" {
12 #define MONO_END_DECLS    }
13 #else
14 #define MONO_BEGIN_DECLS
15 #define MONO_END_DECLS
16 #endif
17
18 MONO_BEGIN_DECLS
19
20 #if defined(_MSC_VER)
21
22 typedef __int8                  int8_t;
23 typedef unsigned __int8         uint8_t;
24 typedef __int16                 int16_t;
25 typedef unsigned __int16        uint16_t;
26 typedef __int32                 int32_t;
27 typedef unsigned __int32        uint32_t;
28 typedef __int64                 int64_t;
29 typedef unsigned __int64        uint64_t;
30
31 #else
32
33 #include <stdint.h>
34
35 #endif /* end of compiler-specific stuff */
36
37 typedef int32_t         mono_bool;
38 typedef uint8_t         mono_byte;
39 typedef uint16_t        mono_unichar2;
40
41 typedef void    (*MonoFunc)     (void* data, void* user_data);
42 typedef void    (*MonoHFunc)    (void* key, void* value, void* user_data);
43
44 void mono_free (void *);
45
46 #define MONO_CONST_RETURN const
47
48 MONO_END_DECLS
49
50 #endif /* __MONO_PUBLIB_H__ */
51