mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
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
This commit is contained in:
14
testModule.c
14
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);
|
||||
|
Reference in New Issue
Block a user