]> git.draconx.ca Git - upkg.git/blobdiff - src/module.c
uobject: Clean up the module loader namespace.
[upkg.git] / src / module.c
index b1067dbd60bda507705eb5dc29c6eea3b3f97676..88a7f81b00137b81a57ed2f7030673e32e7bb03f 100644 (file)
@@ -25,6 +25,7 @@
 #include <ltdl.h>
 
 #include <uobject/module.h>
+#include "module.h"
 #include "avl.h"
 
 static unsigned initialized;
@@ -94,7 +95,7 @@ static void upkg_module_class_init(UPkgModuleClass *class)
        modclass->unload = module_unload;
 }
 
-UPkgModule *upkg_module_new(const char *name)
+static UPkgModule *uobject_module_new(const char *name)
 {
        char *name2;
 
@@ -125,7 +126,7 @@ static int modcmp(const void *a, const void *b, void *_data)
        return strcmp(ma->name, mb->name);
 }
 
-int module_init(void)
+int uobject_module_init(void)
 {
        if (!initialized) {
                package_tree = avl_create(modcmp, NULL, NULL);
@@ -147,7 +148,7 @@ int module_init(void)
        return 0;
 }
 
-int module_exit(void)
+int uobject_module_exit(void)
 {
        if (--initialized)
                return 0;
@@ -160,7 +161,7 @@ int module_exit(void)
        return 0;
 }
 
-GType module_get_class(const char *package, const char *class)
+GType uobject_module_get_class(const char *package, const char *class)
 {
        char buf[strlen(package) + strlen(class) + 1];
        GTypeModule search = { .name = str_cpy_lower(buf, package) };
@@ -169,7 +170,7 @@ GType module_get_class(const char *package, const char *class)
        if (!mod) {
                void **p;
 
-               mod = G_TYPE_MODULE(upkg_module_new(package));
+               mod = G_TYPE_MODULE(uobject_module_new(package));
                if (!mod) {
                        return 0;
                }