GNOME Bugzilla – Bug 531583
GLib module functions incorrectly defined
Last modified: 2008-05-11 10:38:30 UTC
Please describe the problem: GLib module VAPI is wrong as it doesn't allow to specify a NULL file_name in open() and doesn't declare symbol as an out parameter in symbol() Steps to reproduce: GLib.Module module = GLib.Module.open(null, ModuleFlags.BIND_LAZY); void * sym; if(!module.symbol(handler_real_name, out sym)) { ... } Actual results: At compile time: warning: Argument 1: Cannot pass null to non-null parameter type error: Argument 2: Cannot pass out argument to non-output parameter Expected results: Clean compile Does this happen every time? Yes Other information: Patch for glib-2.0.vapi: 1299,1300c1299,1300 < public static Module open (string? file_name, ModuleFlags @flags); < public bool symbol (string symbol_name, out void** symbol); --- > public static Module open (string file_name, ModuleFlags @flags); > public bool symbol (string symbol_name, void** symbol);
Confirming, we should also move it into a separate VAPI file, as it requires linking with libgmodule-2.0.
2008-05-11 Jürg Billeter <j@bitron.ch> * vapi/Makefile.am: * vapi/glib-2.0.vapi: * vapi/gmodule-2.0.vapi: * vapi/gstreamer-0.10.deps: Move dynamic module loading support into separate VAPI file and improve bindings, fixes bug 531583 Fixed in r1362.