Mercurial > pub > dyncall > dyncall
comparison dyncallback/dyncall_callback_x64.c @ 152:d48a8b8d2ef9
- integrated all headers containing DCCallback definition into the translation units used (arm64 already avoided this pointless header, so following that style)
- some cleanups, removal of unnecessary includes, etc.
author | cslag |
---|---|
date | Sat, 22 Oct 2016 15:55:54 +0200 |
parents | 3e629dc19168 |
children | 030fbb70aa1b |
comparison
equal
deleted
inserted
replaced
151:dac66f0107ea | 152:d48a8b8d2ef9 |
---|---|
4 Library: dyncallback | 4 Library: dyncallback |
5 File: dyncallback/dyncall_callback_x64.c | 5 File: dyncallback/dyncall_callback_x64.c |
6 Description: Callback - Implementation for x64 | 6 Description: Callback - Implementation for x64 |
7 License: | 7 License: |
8 | 8 |
9 Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>, | 9 Copyright (c) 2007-2016 Daniel Adler <dadler@uni-goettingen.de>, |
10 Tassilo Philipp <tphilipp@potion-studios.com> | 10 Tassilo Philipp <tphilipp@potion-studios.com> |
11 | 11 |
12 Permission to use, copy, modify, and distribute this software for any | 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 | 13 purpose with or without fee is hereby granted, provided that the above |
14 copyright notice and this permission notice appear in all copies. | 14 copyright notice and this permission notice appear in all copies. |
22 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 22 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
23 | 23 |
24 */ | 24 */ |
25 | 25 |
26 | 26 |
27 | 27 #include "dyncall_callback.h" |
28 #include "dyncall_callback_x64.h" | |
29 #include "dyncall_args_x64.h" | |
30 #include "dyncall_alloc_wx.h" | 28 #include "dyncall_alloc_wx.h" |
31 | 29 #include "dyncall_thunk.h" |
32 | 30 |
33 /* Callback symbol. */ | 31 /* Callback symbol. */ |
34 extern void dcCallback_x64_sysv(); | 32 extern void dcCallback_x64_sysv(); |
35 extern void dcCallback_x64_win64(); | 33 extern void dcCallback_x64_win64(); |
34 | |
35 struct DCCallback | |
36 { | |
37 DCThunk thunk; // offset 0, size 24 | |
38 DCCallbackHandler* handler; // offset 24 | |
39 void* userdata; // offset 32 | |
40 }; | |
36 | 41 |
37 | 42 |
38 void dcbInitCallback(DCCallback* pcb, const char* signature, DCCallbackHandler* handler, void* userdata) | 43 void dcbInitCallback(DCCallback* pcb, const char* signature, DCCallbackHandler* handler, void* userdata) |
39 { | 44 { |
40 pcb->handler = handler; | 45 pcb->handler = handler; |