fix mod function name shadowing
This commit is contained in:
parent
c08e2398ab
commit
7d62a8acc4
1 changed files with 9 additions and 9 deletions
18
modfetch.c
18
modfetch.c
|
@ -274,18 +274,18 @@ int main(int argc, char *argv[]) {
|
|||
// https://stackoverflow.com/questions/14134245/iso-c-void-and-function-pointers
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wpedantic"
|
||||
semver (*version)(void) = dlsym(handle, "version");
|
||||
const char *(*name)(void) = dlsym(handle, "name");
|
||||
const char *(*get)(void) = dlsym(handle, "get");
|
||||
void (*init)(semver, char**) = dlsym(handle, "init");
|
||||
semver (*mod_version)(void) = dlsym(handle, "version");
|
||||
const char *(*mod_name)(void) = dlsym(handle, "name");
|
||||
const char *(*mod_get)(void) = dlsym(handle, "get");
|
||||
void (*mod_init)(semver, char**) = dlsym(handle, "init");
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
init(API_VERSION, current_module.config);
|
||||
mod_init(API_VERSION, current_module.config);
|
||||
|
||||
(void)name;
|
||||
(void)version;
|
||||
// printf("%s: %s\n", name(), svtoa(version()));
|
||||
printf("%s\n", get());
|
||||
(void)mod_name;
|
||||
(void)mod_version;
|
||||
// printf("%s: %s\n", mod_name(), svtoa(mod_version()));
|
||||
printf("%s\n", mod_get());
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue