From 6bdc602565b6780cc4bc3115849271f01cd6628c Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Sun, 12 Jul 2009 19:44:35 -0400 Subject: [PATCH 1/1] 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. --- src/module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.43.2