[gobject-introspection] typelib: Also ignore typelibs with empty c:prefix



commit 80a13ef73bbb32c85e00ff8e7870a5d4723c2196
Author: Colin Walters <walters verbum org>
Date:   Fri Apr 12 13:39:21 2013 -0400

    typelib: Also ignore typelibs with empty c:prefix
    
    As seen in xlib.gir at least; this is something we should probably ban
    though.
    
    https://bugzilla.gnome.org/697759

 girepository/gitypelib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/girepository/gitypelib.c b/girepository/gitypelib.c
index a643cde..d88924a 100644
--- a/girepository/gitypelib.c
+++ b/girepository/gitypelib.c
@@ -294,7 +294,7 @@ g_typelib_matches_gtype_name_prefix (GITypelib *typelib,
   gsize gtype_name_len;
 
   c_prefix = g_typelib_get_string (typelib, header->c_prefix);
-  if (c_prefix == NULL)
+  if (c_prefix == NULL || strlen (c_prefix) == 0)
     return FALSE;
 
   gtype_name_len = strlen (gtype_name);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]