diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2005-01-04 20:18:14 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2005-01-04 20:18:14 +0000 |
commit | be076e9b0611e941d9cdf297a8988ddd6639fa74 (patch) | |
tree | 1ff046ebee36e74c55594fb8b5b04a9981c4484f /testModule.c | |
parent | f6b71bd176bf2a48e052740f0b58c8f69bd07781 (diff) | |
download | android_external_libxml2-be076e9b0611e941d9cdf297a8988ddd6639fa74.tar.gz android_external_libxml2-be076e9b0611e941d9cdf297a8988ddd6639fa74.tar.bz2 android_external_libxml2-be076e9b0611e941d9cdf297a8988ddd6639fa74.zip |
applied patch from Bjorn Reese, plus some cleanups fixed the stylesheet to
* xmlmodule.c include/libxml/xmlmodule.h: applied patch from
Bjorn Reese, plus some cleanups
* elfgcchack.h doc/elfgcchack.xsl: fixed the stylesheet to
add the new header
* doc/* testapi.c: regenerated the API
Daniel
Diffstat (limited to 'testModule.c')
-rw-r--r-- | testModule.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/testModule.c b/testModule.c index e5e9bd6d..a878e036 100644 --- a/testModule.c +++ b/testModule.c @@ -35,12 +35,22 @@ int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { hello_world_t hello_world = NULL; /* build the module filename, and confirm the module exists */ - xmlStrPrintf(filename, sizeof(filename), "%s/testdso%s", (const xmlChar*)MODULE_PATH, (const xmlChar*)LIBXML_MODULE_EXTENSION); + xmlStrPrintf(filename, sizeof(filename), "%s/testdso%s", + (const xmlChar*)MODULE_PATH, + (const xmlChar*)LIBXML_MODULE_EXTENSION); module = xmlModuleOpen((const char*)filename); if (module) { - hello_world = (hello_world_t)xmlModuleSymbol(module, "hello_world"); + if (xmlModuleSymbol(module, "hello_world", (void **) &hello_world)) { + fprintf(stderr, "Failure to lookup\n"); + return(1); + } + if (hello_world == NULL) { + fprintf(stderr, "Lookup returned NULL\n"); + return(1); + } + (*hello_world)(); xmlModuleClose(module); |