GNOME Bugzilla – Bug 659838
incorrect argument types in introspection bindings for g_object_bind_property
Last modified: 2011-09-22 16:48:58 UTC
Created attachment 197262 [details] Python script demonstrating the problem g_object_bind_property() claims that its "source" and "target" arguments are gpointers, but these actually must be GObjects. Unfortunately, the current GObject introspection metadata for this function also claims to accept any gpointer. If called from, e.g., Python, the C code receives pointers to the raw Python wrapper objects, rather than the real GObjects that these wrappers enclose. The result is that non-GObjects are passed down to g_object_bind_property(), which results in a crash. The same problem also affects g_object_bind_property_full() and g_object_bind_property_full_with_closures(), making all three of these unusable via introspection-derived bindings.
Created attachment 197263 [details] [review] Fix annotations for source/target in g_object_bind_property_* This should fix the issue.
Review of attachment 197263 [details] [review]: Hah, I just wrote this patch too. This looks fine.
Attachment 197263 [details] pushed as 8e716cb - Fix annotations for source/target in g_object_bind_property_*