mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 11:42:33 +00:00
properly typecast the function pointers
This commit is contained in:
@@ -30,9 +30,9 @@ int main(int argc, char* argv[])
|
||||
occupiedMem = (pFunc)GetProcessAddress((HMODULE) hndl, (char const*)"occupiedMem");
|
||||
#else /* OSX || NIX */
|
||||
hndl = (void*) dlopen((char const*)"./libshared.so", RTLD_LAZY);
|
||||
status = (void*) dlsym(hndl, (char const*)"status");
|
||||
count = (void*) dlsym(hndl, (char const*)"count");
|
||||
occupiedMem = (void*) dlsym(hndl, (char const*)"occupiedMem");
|
||||
status = (pFunc) dlsym(hndl, (char const*)"status");
|
||||
count = (pFunc) dlsym(hndl, (char const*)"count");
|
||||
occupiedMem = (pFunc) dlsym(hndl, (char const*)"occupiedMem");
|
||||
#endif
|
||||
|
||||
assert(hndl);
|
||||
|
||||
Reference in New Issue
Block a user