From 686ee56fc5e4b8a3573dbad3a0e997fe89ba71a7 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Tue, 18 May 2010 18:25:41 +0200 Subject: now stuck in dlsym/dereferencing type-punned pointer will break strict-aliasing rules beautiness :-) --- include/wolf/library/loader.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/wolf/library/loader.h b/include/wolf/library/loader.h index a2ee16e..2218677 100644 --- a/include/wolf/library/loader.h +++ b/include/wolf/library/loader.h @@ -70,10 +70,22 @@ wolf_error_t wolf_library_unload( wolf_library_p library ); * @param buf the buffer which will hold the error message * @param buflen the size of the buffer * - * @returns a pointer to buf for convenience + * @return a pointer to buf for convenience */ char *wolf_library_errmsg( const wolf_error_t error, const wolf_library_p library, char *buf, size_t buflen ); +/** + * Gets a symbol (usually a function) from the library object. It has to be + * casted properly to the function you are expecting to call. + * + * @param library the library object + * @param name name of the symbol to retrieve + * @param error WOLF_OK if the symbol could be loaded + * + * @return a pointer to the retrieved symbol + */ +void *wolf_library_get( const wolf_library_p library, const char *name, wolf_error_t *error ); + /** @} */ /* @addtogroup wolf_library */ #endif /* ifndef WOLF_LOADER_H */ -- cgit v1.2.3-54-g00ecf