]> git.draconx.ca Git - upkg.git/commitdiff
module: Don't use G_TYPE_MODULE for casts in modcmp.
authorNick Bowler <nbowler@draconx.ca>
Sun, 12 Jul 2009 23:44:35 +0000 (19:44 -0400)
committerNick Bowler <nbowler@draconx.ca>
Sun, 12 Jul 2009 23:44:35 +0000 (19:44 -0400)
This causes problems since we pass ``fake'' GObjects in to avl_find.
Since everything we store in the AVL tree are properly pointers to
GTypeModule, simple assignment should be perfectly fine.

src/module.c

index 24ef2508bbbf919fc729bff01e7edb141cf05e6e..eae9dc759709c9a40813f12c0179f0e9e1fa896c 100644 (file)
@@ -100,8 +100,8 @@ UPkgModule *upkg_module_new(const char *name)
 
 static int modcmp(const void *a, const void *b, void *_data)
 {
-       GTypeModule *ma = G_TYPE_MODULE(a);
-       GTypeModule *mb = G_TYPE_MODULE(b);
+       const GTypeModule *ma = a;
+       const GTypeModule *mb = b;
 
        return strcmp(ma->name, mb->name);
 }