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
70 * Returns a handle for the module or NULL in case of error
75 xmlModulePtr module;
77 module = (xmlModulePtr) xmlMalloc(sizeof(xmlModule));
78 if (module == NULL) {
79 xmlModuleErrMemory(NULL, "creating module");
83 memset(module, 0, sizeof(xmlModule));
85 module->handle = xmlModulePlatformOpen(name);
87 if (module->handle == NULL) {
88 xmlFree(module);
95 module->name = xmlStrdup((const xmlChar *) name);
96 return (module);
101 * @module: the module
105 * Lookup for a symbol address in the given module
114 xmlModuleSymbol(xmlModulePtr module, const char *name, void **symbol)
118 if ((NULL == module) || (symbol == NULL) || (name == NULL)) {
125 rc = xmlModulePlatformSymbol(module->handle, name, symbol);
141 * @module: the module handle
143 * The close operations unload the associated module and free the
144 * data associated to the module.
147 * if the module could not be closed/unloaded.
150 xmlModuleClose(xmlModulePtr module)
154 if (NULL == module) {
157 NULL, NULL, 0, 0, "null module pointer\n");
161 rc = xmlModulePlatformClose(module->handle);
166 (const char *) module->name, NULL, 0, 0,
167 "failed to close: %s\n", module->name);
171 rc = xmlModuleFree(module);
177 * @module: the module handle
179 * The free operations free the data associated to the module
186 xmlModuleFree(xmlModulePtr module)
188 if (NULL == module) {
191 NULL, NULL, 0, 0, "null module pointer\n");
195 xmlFree(module->name);
196 xmlFree(module);
212 * @name: path to the module
225 * @handle: handle to the module