Re: Making GModule use GError.



On 7 Nov 2000, Owen Taylor wrote:

> While GModule would use GError if written from scratch, I tend to
> think that the consistency benefits of changing at this point
> are not worth breaking substantial amounts of existing code; 
> I don't think there is any real gain in functionality from 
> this.

i don't even think i'd use gerror for gmodule if writing it from
scratch right now. the reason being that its error message can
hardly be categrized since we just get strings on some platforms.
while categorization ala "what function stuff failed in, e.g.
loading or symbol matches" is possible, it doesn't really provide
sustantial benefits, since that information is already available
for the caller.

> (I guess the one gain in functionality is proper threaded operation,
> but dlerror() probably uses per-thread data on thread-safe
> C libraries anyways.)

gmodule does an immediate copy of the string returned by dlerror(),
but now you mention it, i'm not sure all platforms are 100% thread
safe for their dl* functionality. i think adding a global recursive
lock in gmodule.c is probably a good idea (recursive because of
the init/unload functions that the lock has to be held across).

> 
> That's my opinion anyways,
>                                         Owen
> 

---
ciaoTJ





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