ImPlatform.h
01:
02:
03:
04:
05:
06:
07:
08:
09:
10: #include "Python.h"
11:
12:
13: #ifndef HAVE_PROTOTYPES
14: #error Sorry, this library requires support for ANSI prototypes.
15: #endif
16: #ifndef STDC_HEADERS
17: #error Sorry, this library requires ANSI header files.
18: #endif
19:
20: #if defined(_MSC_VER)
21: #ifndef WIN32
22: #define WIN32
23: #endif
24:
25:
26:
27:
28:
29:
30:
31: #pragma warning(disable: 4244)
32: #endif
33:
34: #if defined(_MSC_VER)
35: #define inline __inline
36: #elif !defined(USE_INLINE)
37: #define inline
38: #endif
39:
40: #if SIZEOF_SHORT == 2
41: #define INT16 short
42: #elif SIZEOF_INT == 2
43: #define INT16 int
44: #else
45: #define INT16 short
46: #endif
47:
48: #if SIZEOF_SHORT == 4
49: #define INT32 short
50: #elif SIZEOF_INT == 4
51: #define INT32 int
52: #elif SIZEOF_LONG == 4
53: #define INT32 long
54: #else
55: #error Cannot find required 32-bit integer type
56: #endif
57:
58: #if SIZEOF_LONG == 8
59: #define INT64 long
60: #elif SIZEOF_LONG_LONG == 8
61: #define INT64 long
62: #endif
63:
64:
65: #define FLOAT32 float
66: #define FLOAT64 double
67:
68: #define INT8 signed char
69: #define UINT8 unsigned char
70:
71: #define UINT16 unsigned INT16
72: #define UINT32 unsigned INT32
73:
© Andrew Scott 2006 -
2025,
All Rights Reserved