From: Rick Bird Date: Mon, 18 Apr 2011 05:44:06 +0000 (-0400) Subject: Renamed my utility ptr for modules in relation to ISO C Compliance. X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=84216f513dc229917e8189cebd35d8526f39548b;p=cobramush.git Renamed my utility ptr for modules in relation to ISO C Compliance. IssueID #238 --- diff --git a/hdrs/modules.h b/hdrs/modules.h index 0a6425e..f95a979 100644 --- a/hdrs/modules.h +++ b/hdrs/modules.h @@ -19,7 +19,7 @@ int module_open(char *path, char *name); int module_close(struct module_entry_t *m); int modules_shutdown(void); -extern void *utility_memcpy_ptr; /* This gets us through the ISO C warnings about our POSIX compliance macros */ +extern void *module_utility_fptr; /* This gets us through the ISO C warnings about our POSIX compliance macros */ /* Iterate through Module List */ #define MODULE_ITER(m) for(m = module_list ; m != NULL ; m = m->next) @@ -29,15 +29,15 @@ extern void *utility_memcpy_ptr; /* This gets us through the ISO C warnings abou /* Retrieve Module Function */ /* This Macro can only be used for non-returning calls */ #define MODULE_FUNC(h, m, func, ...) \ - utility_memcpy_ptr = lt_dlsym(m, func); \ - memcpy(&h, &utility_memcpy_ptr, sizeof(utility_memcpy_ptr)); \ + module_utility_fptr = lt_dlsym(m, func); \ + memcpy(&h, &module_utility_fptr, sizeof(module_utility_fptr)); \ if(h) { \ h(__VA_ARGS__); \ } #define MODULE_FUNC_NOARGS(h, m, func) \ - utility_memcpy_ptr = lt_dlsym(m, func); \ - memcpy(&h, &utility_memcpy_ptr, sizeof(utility_memcpy_ptr)); \ + module_utility_fptr = lt_dlsym(m, func); \ + memcpy(&h, &module_utility_fptr, sizeof(module_utility_fptr)); \ if(h) { \ h(); \ } diff --git a/src/modules.c b/src/modules.c index dd5146e..ff2a0ec 100644 --- a/src/modules.c +++ b/src/modules.c @@ -20,8 +20,10 @@ struct module_entry_t *module_list = NULL; -/* Utility power for my macros... This gets us through the ISO C warnings about our posix compliance issues.. */ -void *utility_memcpy_ptr; +/* Function utility pointer for module system macros. + * This gets us through the ISO C warnings about our posix compliance issues. + **/ +void *module_utility_fptr; /* Ads a module entry and returns */ struct module_entry_t *module_entry_add(char *name) {