Mercurial > pub > dyncall > dyncall
comparison dyncallback/dyncall_callback_arm64.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_arm64.c | 5 File: dyncallback/dyncall_callback_arm64.c |
6 Description: Callback - Implementation for ARM64 / ARMv8 / AAPCS64 | 6 Description: Callback - Implementation for ARM64 / ARMv8 / AAPCS64 |
7 License: | 7 License: |
8 | 8 |
9 Copyright (c) 2015 Daniel Adler <dadler@uni-goettingen.de>, | 9 Copyright (c) 2015-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. |
15 | 15 |
21 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 21 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
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 #include "dyncall_callback.h" | 27 #include "dyncall_callback.h" |
27 #include "dyncall_alloc_wx.h" | 28 #include "dyncall_alloc_wx.h" |
28 #include "dyncall_thunk.h" | 29 #include "dyncall_thunk.h" |
29 | 30 |
31 /* Callback symbol. */ | |
30 extern void dcCallbackThunkEntry(); | 32 extern void dcCallbackThunkEntry(); |
31 | 33 |
32 struct DCCallback | 34 struct DCCallback /* off size */ |
33 { | 35 { /* ----|----- */ |
34 // off size | 36 DCThunk thunk; /* 0 32 */ |
35 // ----|----- | 37 DCCallbackHandler* handler; /* 32 8 */ |
36 DCThunk thunk; // 0 32 | 38 void* userdata; /* 40 8 */ |
37 DCCallbackHandler* handler; // 32 8 | 39 }; /* total 48 */ |
38 void* userdata; // 40 8 | 40 /* aligned 48 */ |
39 // | |
40 // size 48 | |
41 // aligned 48 | |
42 }; | |
43 | 41 |
44 void dcbInitCallback(DCCallback* pcb, const char* signature, DCCallbackHandler* handler, void* userdata) | 42 void dcbInitCallback(DCCallback* pcb, const char* signature, DCCallbackHandler* handler, void* userdata) |
45 { | 43 { |
46 pcb->handler = handler; | 44 pcb->handler = handler; |
47 pcb->userdata = userdata; | 45 pcb->userdata = userdata; |