Lines Matching defs:module

2  * xmlmodule.c : basic API for dynamic module loading added 2.6.17
33 * module memory error handler *
44 xmlModuleErrMemory(xmlModulePtr module, const char *extra)
48 if (module != NULL) {
49 name = (const char *) module->name;
60 * @name: the module name
63 * Opens a module/shared library given its name or path
66 * Returns a handle for the module or NULL in case of error
71 xmlModulePtr module;
73 module = (xmlModulePtr) xmlMalloc(sizeof(xmlModule));
74 if (module == NULL) {
75 xmlModuleErrMemory(NULL, "creating module");
79 memset(module, 0, sizeof(xmlModule));
81 module->handle = xmlModulePlatformOpen(name);
83 if (module->handle == NULL) {
84 xmlFree(module);
91 module->name = xmlStrdup((const xmlChar *) name);
92 return (module);
97 * @module: the module
101 * Lookup for a symbol address in the given module
106 xmlModuleSymbol(xmlModulePtr module, const char *name, void **symbol)
110 if ((NULL == module) || (symbol == NULL)) {
117 rc = xmlModulePlatformSymbol(module->handle, name, symbol);
133 * @module: the module handle
135 * The close operations unload the associated module and free the
136 * data associated to the module.
139 * if the module could not be closed/unloaded.
142 xmlModuleClose(xmlModulePtr module)
146 if (NULL == module) {
149 NULL, NULL, 0, 0, "null module pointer\n");
153 rc = xmlModulePlatformClose(module->handle);
158 (const char *) module->name, NULL, 0, 0,
159 "failed to close: %s\n", module->name);
163 rc = xmlModuleFree(module);
169 * @module: the module handle
171 * The free operations free the data associated to the module
178 xmlModuleFree(xmlModulePtr module)
180 if (NULL == module) {
183 NULL, NULL, 0, 0, "null module pointer\n");
187 xmlFree(module->name);
188 xmlFree(module);
204 * @name: path to the module
217 * @handle: handle to the module