gobject-introspection r446 - in trunk: . giscanner



Author: walters
Date: Thu Aug 21 20:59:24 2008
New Revision: 446
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=446&view=rev

Log:
2008-08-21  Colin Walters  <walters verbum org>

	* giscanner/glibtransformer.py: Compute prefix
	by searching through the symbol for bits
	rather than going directly from ctype; this fixes
	webkit_ namespace.


Modified:
   trunk/ChangeLog
   trunk/giscanner/glibtransformer.py

Modified: trunk/giscanner/glibtransformer.py
==============================================================================
--- trunk/giscanner/glibtransformer.py	(original)
+++ trunk/giscanner/glibtransformer.py	Thu Aug 21 20:59:24 2008
@@ -257,8 +257,13 @@
             # Look at the original C type (before namespace stripping), without
             # pointers: GtkButton -> gtk_button_, so we can figure out the
             # method name
-            orig_type = target_arg.type.ctype.replace('*', '')
-            prefix = to_underscores(orig_type).lower()
+            argtype = target_arg.type.ctype.replace('*', '')
+            name = self._transformer.strip_namespace_object(argtype)
+            name_uscore = to_underscores(name).lower()
+            name_offset = func.symbol.find(name_uscore)
+            if name_offset < 0:
+                return None
+            prefix = func.symbol[:name_offset+len(name_uscore)]
         else:
             # Constructors must have _new
             # Take everything before that as class name



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