Mercurial > pub > dyncall > dyncall
changeset 171:011b5e3a8548
- compatibility for older platforms - use ANSI comments
author | cslag |
---|---|
date | Tue, 10 Jan 2017 12:01:59 +0100 |
parents | ee0de14d5da0 |
children | b27557033057 |
files | dyncall/dyncall_api.c dyncall/dyncall_callf.c dynload/dynload_syms_elf.c dynload/dynload_unix.c |
diffstat | 4 files changed, 16 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/dyncall/dyncall_api.c Sun Jan 08 14:21:41 2017 +0100 +++ b/dyncall/dyncall_api.c Tue Jan 10 12:01:59 2017 +0100 @@ -157,13 +157,14 @@ return vm->mError; } -//@@@ not used, (re)introduce or cleanup -//const char* dcGetErrorString(int mode) -//{ -// switch(mode) { -// case DC_ERROR_NONE: return "none"; -// case DC_ERROR_UNSUPPORTED_MODE: return "unsupported mode"; -// default: return "(unknown mode id)"; -// } -//} +/*@@@ not used, (re)introduce or cleanup +const char* dcGetErrorString(int mode) +{ + switch(mode) { + case DC_ERROR_NONE: return "none"; + case DC_ERROR_UNSUPPORTED_MODE: return "unsupported mode"; + default: return "(unknown mode id)"; + } +} +*/
--- a/dyncall/dyncall_callf.c Sun Jan 08 14:21:41 2017 +0100 +++ b/dyncall/dyncall_callf.c Tue Jan 10 12:01:59 2017 +0100 @@ -28,7 +28,7 @@ #include "dyncall_callf.h" -// Shareable implementation for argument binding used in ArgF and CallF below. +/* Shareable implementation for argument binding used in ArgF and CallF below. */ static void dcArgF_impl(DCCallVM* vm, const DCsigchar** sigptr, va_list args) { DCsigchar ch;
--- a/dynload/dynload_syms_elf.c Sun Jan 08 14:21:41 2017 +0100 +++ b/dynload/dynload_syms_elf.c Tue Jan 10 12:01:59 2017 +0100 @@ -160,7 +160,7 @@ } break; case SHT_STRTAB: - // Do not trust pSyms->pElf_Ehdr->e_shstrndx! + /* Do not trust pSyms->pElf_Ehdr->e_shstrndx! */ if (!pSyms->pStrTab) { pSyms->pStrTab = (const char*)pSectionContent; pSyms->strTabSize = pSection->sh_size;
--- a/dynload/dynload_unix.c Sun Jan 08 14:21:41 2017 +0100 +++ b/dynload/dynload_unix.c Tue Jan 10 12:01:59 2017 +0100 @@ -54,11 +54,10 @@ void dlFreeLibrary(DLLib* libHandle) { - // Check for NULL for cross-platform consistency. *BSD seems - // to do that in dlclose, Linux does not. POSIX states "if handle - // does not refer to an open object, dlclose() returns a non-zero - // value", which unfortunately sounds like it's not explicitly - // specified. + /* Check for NULL for cross-platform consistency. *BSD seems to do that in + dlclose, Linux does not. POSIX states "if handle does not refer to an open + object, dlclose() returns a non-zero value", which unfortunately sounds + like it's not explicitly specified. */ if(libHandle) dlclose((void*)libHandle); }