Mercurial > pub > dyncall > dyncall
annotate dyncall/dyncall_signature.h @ 663:127b569978cc default tip
- another tweak handling clang trying to be too smart (see last commit)
author | Tassilo Philipp |
---|---|
date | Sun, 24 Mar 2024 13:52:44 +0100 |
parents | 71c884e610f0 |
children |
rev | line source |
---|---|
0 | 1 /* |
2 | |
3 Package: dyncall | |
4 Library: dyncall | |
5 File: dyncall/dyncall_signature.h | |
6 Description: Type and calling-convention signature character defines | |
7 License: | |
8 | |
533
71c884e610f0
- integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents:
466
diff
changeset
|
9 Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>, |
0 | 10 Tassilo Philipp <tphilipp@potion-studios.com> |
11 | |
12 Permission to use, copy, modify, and distribute this software for any | |
13 purpose with or without fee is hereby granted, provided that the above | |
14 copyright notice and this permission notice appear in all copies. | |
15 | |
16 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
17 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
18 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
19 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
20 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
21 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
22 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
23 | |
24 */ | |
25 | |
26 | |
27 #ifndef DYNCALL_SIGNATURE_H | |
28 #define DYNCALL_SIGNATURE_H | |
29 | |
30 typedef char DCsigchar; | |
31 | |
32 #define DC_SIGCHAR_VOID 'v' | |
33 #define DC_SIGCHAR_BOOL 'B' | |
34 #define DC_SIGCHAR_CHAR 'c' | |
35 #define DC_SIGCHAR_UCHAR 'C' | |
36 #define DC_SIGCHAR_SHORT 's' | |
37 #define DC_SIGCHAR_USHORT 'S' | |
38 #define DC_SIGCHAR_INT 'i' | |
39 #define DC_SIGCHAR_UINT 'I' | |
40 #define DC_SIGCHAR_LONG 'j' | |
41 #define DC_SIGCHAR_ULONG 'J' | |
42 #define DC_SIGCHAR_LONGLONG 'l' | |
43 #define DC_SIGCHAR_ULONGLONG 'L' | |
44 #define DC_SIGCHAR_FLOAT 'f' | |
45 #define DC_SIGCHAR_DOUBLE 'd' | |
533
71c884e610f0
- integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents:
466
diff
changeset
|
46 #define DC_SIGCHAR_POINTER 'p' /* also used for arrays, as such args decay to ptrs */ |
403 | 47 #define DC_SIGCHAR_STRING 'Z' /* in theory same as 'p', but convenient to disambiguate */ |
533
71c884e610f0
- integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents:
466
diff
changeset
|
48 #define DC_SIGCHAR_AGGREGATE 'A' /* aggregate (struct/union described out-of-band via DCaggr) */ |
71c884e610f0
- integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents:
466
diff
changeset
|
49 #define DC_SIGCHAR_ENDARG ')' |
0 | 50 |
358
30aae7371373
- extended signature with calling convention mode switches for fastcall (gnu), default, cdecl, stdcall, arm (arm), arm (thumb), syscall
Tassilo Philipp
parents:
281
diff
changeset
|
51 /* calling convention / mode signatures */ |
0 | 52 |
533
71c884e610f0
- integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents:
466
diff
changeset
|
53 #define DC_SIGCHAR_CC_PREFIX '_' /* announces next char to be one of the below calling convention mode chars */ |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
403
diff
changeset
|
54 #define DC_SIGCHAR_CC_DEFAULT ':' /* default calling conv (platform native) */ |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
403
diff
changeset
|
55 #define DC_SIGCHAR_CC_THISCALL '*' /* C++ this calls (platform native) */ |
358
30aae7371373
- extended signature with calling convention mode switches for fastcall (gnu), default, cdecl, stdcall, arm (arm), arm (thumb), syscall
Tassilo Philipp
parents:
281
diff
changeset
|
56 #define DC_SIGCHAR_CC_ELLIPSIS 'e' |
30aae7371373
- extended signature with calling convention mode switches for fastcall (gnu), default, cdecl, stdcall, arm (arm), arm (thumb), syscall
Tassilo Philipp
parents:
281
diff
changeset
|
57 #define DC_SIGCHAR_CC_ELLIPSIS_VARARGS '.' |
466
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
403
diff
changeset
|
58 #define DC_SIGCHAR_CC_CDECL 'c' /* x86 specific */ |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
403
diff
changeset
|
59 #define DC_SIGCHAR_CC_STDCALL 's' /* x86 specific */ |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
403
diff
changeset
|
60 #define DC_SIGCHAR_CC_FASTCALL_MS 'F' /* x86 specific */ |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
403
diff
changeset
|
61 #define DC_SIGCHAR_CC_FASTCALL_GNU 'f' /* x86 specific */ |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
403
diff
changeset
|
62 #define DC_SIGCHAR_CC_THISCALL_MS '+' /* x86 specific, MS C++ this calls */ |
ddfb9577a00e
introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed
Tassilo Philipp
parents:
403
diff
changeset
|
63 #define DC_SIGCHAR_CC_THISCALL_GNU '#' /* x86 specific, GNU C++ this calls are cdecl, but keep specific sig char for clarity */ |
358
30aae7371373
- extended signature with calling convention mode switches for fastcall (gnu), default, cdecl, stdcall, arm (arm), arm (thumb), syscall
Tassilo Philipp
parents:
281
diff
changeset
|
64 #define DC_SIGCHAR_CC_ARM_ARM 'A' |
30aae7371373
- extended signature with calling convention mode switches for fastcall (gnu), default, cdecl, stdcall, arm (arm), arm (thumb), syscall
Tassilo Philipp
parents:
281
diff
changeset
|
65 #define DC_SIGCHAR_CC_ARM_THUMB 'a' |
30aae7371373
- extended signature with calling convention mode switches for fastcall (gnu), default, cdecl, stdcall, arm (arm), arm (thumb), syscall
Tassilo Philipp
parents:
281
diff
changeset
|
66 #define DC_SIGCHAR_CC_SYSCALL '$' |
0 | 67 |
68 #endif /* DYNCALL_SIGNATURE_H */ | |
69 |