]> git.draconx.ca Git - upkg.git/blobdiff - src/engine/music.gob
uobject: Make interface functions take UObjects directly.
[upkg.git] / src / engine / music.gob
index 920e23c372854433af49a940c6e360b537092f15..879e0adbbf0c66f6cf8d61b516b6f48e59420bd3 100644 (file)
@@ -39,10 +39,10 @@ class Engine:Music from U:Object (dynamic)
        private unsigned loaded = 0;
 
        interface U:Object:Loadable
        private unsigned loaded = 0;
 
        interface U:Object:Loadable
-       private int load(G:Object *go)
+       private int load(U:Object *uo)
        {
        {
-               struct upkg_file *f = U_OBJECT(go)->pkg_file;
-               Self *self = SELF(go);
+               struct upkg_file *f = uo->pkg_file;
+               Self *self = SELF(uo);
 
                if (!self->_priv->loaded) {
                        g_return_val_if_fail(f != NULL, -1);
 
                if (!self->_priv->loaded) {
                        g_return_val_if_fail(f != NULL, -1);
@@ -60,9 +60,9 @@ class Engine:Music from U:Object (dynamic)
        }
 
        interface U:Object:Loadable
        }
 
        interface U:Object:Loadable
-       private void unload(G:Object *go)
+       private void unload(U:Object *uo)
        {
        {
-               Self *self = SELF(go);
+               Self *self = SELF(uo);
 
                g_return_if_fail(self->_priv->loaded > 0);
 
 
                g_return_if_fail(self->_priv->loaded > 0);
 
@@ -71,37 +71,37 @@ class Engine:Music from U:Object (dynamic)
        }
 
        interface U:Object:Exportable
        }
 
        interface U:Object:Exportable
-       private int export(G:Object *go, FILE *f)
+       private int export(U:Object *uo, FILE *f)
        {
        {
-               Self *self = SELF(go);
+               Self *self = SELF(uo);
                int rc;
 
                int rc;
 
-               if (self_load(go) != 0)
+               if (self_load(uo) != 0)
                        return -1;
 
                rc = music_mod_dump(self->_priv->mod, f);
 
                        return -1;
 
                rc = music_mod_dump(self->_priv->mod, f);
 
-               self_unload(go);
+               self_unload(uo);
                return rc;
        }
 
        interface U:Object:Exportable
                return rc;
        }
 
        interface U:Object:Exportable
-       private int export_name(G:Object *go, char *buf, size_t n)
+       private int export_name(U:Object *uo, char *buf, size_t n)
        {
        {
-               Self *self = SELF(go);
+               Self *self = SELF(uo);
                const char *type;
                int rc;
 
                const char *type;
                int rc;
 
-               if (self_load(go) != 0) {
+               if (self_load(uo) != 0) {
                        if (n > 0)
                                buf[0] = '\0';
                        return 0;
                }
 
                type = music_mod_type(self->_priv->mod);
                        if (n > 0)
                                buf[0] = '\0';
                        return 0;
                }
 
                type = music_mod_type(self->_priv->mod);
-               rc = snprintf(buf, n, "%s.%s", U_OBJECT(go)->pkg_file->name, type);
+               rc = snprintf(buf, n, "%s.%s", uo->pkg_file->name, type);
 
 
-               self_unload(go);
+               self_unload(uo);
                return rc;
        }
 
                return rc;
        }