Mercurial > pub > dyncall > dyncall
annotate dyncall/dyncall_signature.h @ 364:3bdd326dc269
- Todo entries
- some clarifications in code about GNU thiscalls (which are effectively idential to cdecl calls)
* took away own mode identifier, as aliasing to cdecl now
- cleanups
author | Tassilo Philipp |
---|---|
date | Tue, 14 Apr 2020 19:35:30 +0200 |
parents | 78dfa2f9783a |
children | a3e47b7c808c |
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 | |
362
78dfa2f9783a
- added helper function dcGetModeFromCCSigChar() mapping callconv sig chars to respective mode
Tassilo Philipp
parents:
358
diff
changeset
|
9 Copyright (c) 2007-2020 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 | |
28 /* | |
29 | |
30 dyncall signature characters | |
31 | |
32 REVISION | |
33 2007/12/11 initial | |
34 | |
35 */ | |
36 | |
37 | |
38 #ifndef DYNCALL_SIGNATURE_H | |
39 #define DYNCALL_SIGNATURE_H | |
40 | |
41 typedef char DCsigchar; | |
42 | |
43 #define DC_SIGCHAR_VOID 'v' | |
44 #define DC_SIGCHAR_BOOL 'B' | |
45 #define DC_SIGCHAR_CHAR 'c' | |
46 #define DC_SIGCHAR_UCHAR 'C' | |
47 #define DC_SIGCHAR_SHORT 's' | |
48 #define DC_SIGCHAR_USHORT 'S' | |
49 #define DC_SIGCHAR_INT 'i' | |
50 #define DC_SIGCHAR_UINT 'I' | |
51 #define DC_SIGCHAR_LONG 'j' | |
52 #define DC_SIGCHAR_ULONG 'J' | |
53 #define DC_SIGCHAR_LONGLONG 'l' | |
54 #define DC_SIGCHAR_ULONGLONG 'L' | |
55 #define DC_SIGCHAR_FLOAT 'f' | |
56 #define DC_SIGCHAR_DOUBLE 'd' | |
57 #define DC_SIGCHAR_POINTER 'p' | |
58 #define DC_SIGCHAR_STRING 'Z' | |
59 #define DC_SIGCHAR_STRUCT 'T' | |
60 #define DC_SIGCHAR_ENDARG ')' /* also works for end struct */ | |
61 | |
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
|
62 /* calling convention / mode signatures */ |
0 | 63 |
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_PREFIX '_' |
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_DEFAULT ':' |
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_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
|
67 #define DC_SIGCHAR_CC_ELLIPSIS_VARARGS '.' |
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
|
68 #define DC_SIGCHAR_CC_CDECL 'c' |
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
|
69 #define DC_SIGCHAR_CC_STDCALL 's' |
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
|
70 #define DC_SIGCHAR_CC_FASTCALL_MS 'F' |
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
|
71 #define DC_SIGCHAR_CC_FASTCALL_GNU 'f' |
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
|
72 #define DC_SIGCHAR_CC_THISCALL_MS '+' |
364 | 73 #define DC_SIGCHAR_CC_THISCALL_GNU '#' /* GNU thiscalls 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
|
74 #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
|
75 #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
|
76 #define DC_SIGCHAR_CC_SYSCALL '$' |
0 | 77 |
78 #endif /* DYNCALL_SIGNATURE_H */ | |
79 |