Mercurial > pub > dyncall > dyncall
diff dyncallback/dyncall_callback_ppc64.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 |
line wrap: on
line diff
--- a/dyncallback/dyncall_callback_ppc64.c Sat Sep 17 14:31:54 2016 +0200 +++ b/dyncallback/dyncall_callback_ppc64.c Sat Oct 22 15:55:54 2016 +0200 @@ -6,7 +6,7 @@ Description: Callback - Implementation Header for ppc64 License: - Copyright (c) 2014-2015 Masanori Mitsugi <mitsugi@linux.vnet.ibm.com> + Copyright (c) 2014-2016 Masanori Mitsugi <mitsugi@linux.vnet.ibm.com> Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -24,7 +24,20 @@ #include "dyncall_callback.h" -#include "dyncall_callback_ppc64.h" +#include "dyncall_alloc_wx.h" +#include "dyncall_thunk.h" + +/* Callback symbol. */ +extern void dcCallbackThunkEntry(); + +struct DCCallback /* ELF v1 | ELF v2 */ +{ /* ------------------+------------------ */ + DCThunk thunk; /* offset 0 size 64 | offset 0 size 48 */ + DCCallbackHandler* handler; /* offset 64 size 8 | offset 48 size 8 */ + size_t stack_cleanup; /* offset 72 size 8 | offset 56 size 8 */ + void* userdata; /* offset 80 size 8 | offset 64 size 8 */ +}; + void dcbInitCallback(DCCallback* pcb, const char* signature, DCCallbackHandler* handler, void* userdata) { @@ -35,8 +48,6 @@ pcb->userdata = userdata; } -extern void dcCallbackThunkEntry(); - DCCallback* dcbNewCallback(const char* signature, DCCallbackHandler* handler, void* userdata) { DCCallback* pcb;