[gtkmm] Glib::Module API issues



Hi,

I'm using Glib::Module to load C++ objects from .so files at runtime --
the good news is that it works.  However, there appears to be a problem
with the wrapping.

The C API is:

GModule* g_module_open (const gchar *file_name, GModuleFlags flags);

Returns a GModule*, or NULL on failure.

However, the C++ API:

Glib::Module::Module (const std::string& file_name, ModuleFlags flags);

If I use the constructor directly, I can't have a null GModule on the
stack. If I use new, then I don't seem to get a null pointer even if I
try and load a module which doesn't exist.

I've compared module.hg and gtk/window.hg, and the way they declare the
constructor wrapping is totally different. Of course, not being a gtkmm
wrapping wizzard, this could be intentional. But as Glib::Module isn't a
commonly used class, I guess this sort of bug could have gone unnoticed.

So, is there a bug in the wrapping? Or am I going mad...

Regards,
Ross
-- 
Ross Burton                     Software Engineer
OneEighty Software Ltd          Tel: +44 20 8680 8712
Cygnet House                    Fax: +44 20 8680 8453
12-14 Sydenham Road             r burton 180sw com
Croydon, Surrey CR9 2ET, UK     http://www.180sw.com./
====================================================================
Under the Regulation of Investigatory Powers (RIP) Act 2000 together
with any and all Regulations in force pursuant to the Act OneEighty
Software Ltd reserves the right to monitor any or all incoming or
outgoing communications as provided for under the Act




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