From: Nick Bowler Date: Sun, 12 Jul 2009 23:44:35 +0000 (-0400) Subject: module: Don't use G_TYPE_MODULE for casts in modcmp. X-Git-Url: https://git.draconx.ca/gitweb/upkg.git/commitdiff_plain/6bdc602565b6780cc4bc3115849271f01cd6628c module: Don't use G_TYPE_MODULE for casts in modcmp. 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. --- diff --git a/src/module.c b/src/module.c index 24ef250..eae9dc7 100644 --- a/src/module.c +++ b/src/module.c @@ -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); }