diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2010-05-21 15:31:37 +0200 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2010-05-21 15:31:37 +0200 |
commit | d0d576d61d65f7b42db1cc7331f1c7c9879e90e9 (patch) | |
tree | 40eb97a6ace92157666f000bc6932bee99d766ad | |
parent | 223b524f4636be7aa030f8609125d54cd9ea0882 (diff) | |
download | wolfbones-d0d576d61d65f7b42db1cc7331f1c7c9879e90e9.tar.gz wolfbones-d0d576d61d65f7b42db1cc7331f1c7c9879e90e9.tar.bz2 |
final cleanup in documentation of library loader
-rw-r--r-- | TODOS | 5 | ||||
-rw-r--r-- | include/wolf/library/loader.h | 4 | ||||
-rw-r--r-- | tests/library/test_loader.c | 5 |
3 files changed, 8 insertions, 6 deletions
@@ -1,5 +1,6 @@ - library loader - - do Windows version - make install installs the testlib, split in two - check if we can get variable symbols on Windows - - find a nice macro layer for the void * dlsym casting + - add error handling on Windows + - find solution for char *, TCHAR unicode and friends +
\ No newline at end of file diff --git a/include/wolf/library/loader.h b/include/wolf/library/loader.h index 19979af..437fa1b 100644 --- a/include/wolf/library/loader.h +++ b/include/wolf/library/loader.h @@ -58,6 +58,10 @@ typedef struct wolf_library_t *wolf_library_p; * * Reason: conversion from void * to function pointer is illegal by ISO-99 * (though it works actually on Posix) + * + * for the reasons why naive casting doesn't work with dlsym, see: + * + * http://en.wikipedia.org/wiki/Dynamic_loading */ #if defined _WIN32 #define WOLF_LIBRARY_FUNC_CAST( symbol__, func_t__, func__ ) func__ = (func_t__)symbol__ diff --git a/tests/library/test_loader.c b/tests/library/test_loader.c index ddcdbc5..50ed8db 100644 --- a/tests/library/test_loader.c +++ b/tests/library/test_loader.c @@ -44,10 +44,7 @@ int main( void ) { return EXIT_FAILURE; } - /* fetch a known function symbol (multiply_by_two), for the reasons why naive - * casting doesn't work, see: - * http://en.wikipedia.org/wiki/Dynamic_loading - */ + /* fetch a known function symbol (multiply_by_two) */ symbol = wolf_library_get_func( library, "multiply_by_two", &error ); if( error != WOLF_OK ) { fprintf( stderr, "Error %d fetching a function from the library: %s\n", |