Re: gmodule-dl.c: _g_module_symbol()



On Mon, 2006-12-11 at 18:41 +0100, Felix Kater wrote:
> Just this annotation:
> 
> On linux 'man dlopen' says that the correct way to check if dlsym() was
> successful is to do something like this
> 
> dlerror();
> p=dlsym(...);
> pc=dlerror();
> if(pc)
>   /* (error) */
> else
>   /* (ok) */
> 
> 
> while in gmodule-dl.c it is used:
> 
> 
> p=dlsym(...);
> if(!p)
>   /* (error) */
> else
>   /* (ok) */

Seems you are right, GModule will return an error when the symbol
is found, but is NULL. That's a valid use case however.

Would you please file this at http://bugzilla.gnome.org/ ?

thanks,
--mitch




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