fix mod function name shadowing

This commit is contained in:
jacekpoz 2024-02-11 20:05:31 +01:00
parent c08e2398ab
commit 7d62a8acc4
No known key found for this signature in database
GPG key ID: 94E812A8B12AAE3C

View file

@ -274,18 +274,18 @@ int main(int argc, char *argv[]) {
// https://stackoverflow.com/questions/14134245/iso-c-void-and-function-pointers // https://stackoverflow.com/questions/14134245/iso-c-void-and-function-pointers
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic" #pragma GCC diagnostic ignored "-Wpedantic"
semver (*version)(void) = dlsym(handle, "version"); semver (*mod_version)(void) = dlsym(handle, "version");
const char *(*name)(void) = dlsym(handle, "name"); const char *(*mod_name)(void) = dlsym(handle, "name");
const char *(*get)(void) = dlsym(handle, "get"); const char *(*mod_get)(void) = dlsym(handle, "get");
void (*init)(semver, char**) = dlsym(handle, "init"); void (*mod_init)(semver, char**) = dlsym(handle, "init");
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
init(API_VERSION, current_module.config); mod_init(API_VERSION, current_module.config);
(void)name; (void)mod_name;
(void)version; (void)mod_version;
// printf("%s: %s\n", name(), svtoa(version())); // printf("%s: %s\n", mod_name(), svtoa(mod_version()));
printf("%s\n", get()); printf("%s\n", mod_get());
} }
return 0; return 0;