GNOME Bugzilla – Bug 598993
Use best known derived parent
Last modified: 2015-02-07 16:57:58 UTC
In the case where a known class derives from a hidden one, we want to use the most-derived parent class, rather than simply falling back to GObject. Example: FooEmbedWidget in libfoo derives from ClutterGLXTexturePixmap from clutter, which is a hidden class. ClutterGLXTexturePixmap's parent itself is ClutterX11TexturePixmap, which is also hidden. But its parent is ClutterTexture, which we do know. Use that.
Created attachment 145811 [details] [review] Use best known derived parent
Comment on attachment 145811 [details] [review] Use best known derived parent (Colin asked for someone to review this... not claiming I necessarily understand all the internals of gobject-introspection...) I don't see anything wrong with the patch. Two minor comments: >Example: >FooEmbedWidget in libfoo derives from ... Just say "ShellGtkEmbed in gnome-shell". Then if someone else wants to change the code later, they know where to look to see if it's going to break something. >+ if (first) >+ first = FALSE; >+ else >+ g_string_append_c (parent_str, ','); FWIW I usually do: if (parent_str->len > 0) g_string_append_c (parent_str, ','); which gets rid of the extra "first" variable
Attachment 145811 [details] pushed as 0d9cfb0 - Use best known derived parent
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]