type | java bits | native-x32 bits | native-x64 bits | type | signed | origin |
---|---|---|---|---|---|---|
void | 0 | 0 | 0 | void | void | ANSI-C |
char | 8 | 8 | 8 | integer | signed or unsigned | ANSI-C |
short | 16 | 16 | 16 | integer | signed or unsigned | ANSI-C |
int | 32 | 32 | 32 | integer | signed or unsigned | ANSI-C |
long | 64 | 32 | 321 | integer | signed or unsigned | Windows |
long | 64 | 32 | 64 | integer | signed or unsigned | Unix |
float | 32 | 32 | 32 | float | signed | ANSI-C |
double | 64 | 64 | 64 | double | signed | ANSI-C |
__int32 | 32 | 32 | 32 | integer | signed or unsigned | windows |
int32_t | 32 | 32 | 32 | integer | signed | stdint.h |
wchar_t | 32 | 32 | 32 | integer | signed | stddef.h |
uint32_t | 32 | 32 | 32 | integer | unsigned | stdint.h |
__int64 | 64 | 64 | 64 | integer | signed or unsigned | windows |
int64_t | 64 | 64 | 64 | integer | signed | stdint.h |
uint64_t | 64 | 64 | 64 | integer | unsigned | stdint.h |
ptrdiff_t | 64 | 32 | 64 | integer | signed | stddef.h |
intptr_t | 64 | 32 | 64 | integer | signed | stdint.h |
size_t | 64 | 32 | 64 | integer | unsigned | stddef.h |
uintptr_t | 64 | 32 | 64 | integer | unsigned | stdint.h |
Warning: Try to avoid unspecified bit sized types, especially long, since it differs on Unix and Windows!
Note 1: Type long will result in broken code on Windows, since we don't differentiate the OS and it's bit size is ambiguous.
#include <gluegen_stdint.h> #include <gluegen_stddef.h> uint64_t test64; size_t size1; ptrdiff_t ptr1;
-I
:gluegen/make/stub_includes/platform
includeRefid
element:gluegen/make/stub_includes/gluegen
#define __GLUEGEN__ 2