Re: [xml] [PATCH] DSO/Module Support

On Tue, Dec 21, 2004 at 08:41:26PM +0100, Bjorn Reese wrote:
Joel Reed wrote:

+void* xmlModulePlatformSymbol(void* handle, const char* name)
+  void* sym;
+  sym = dlsym(handle, name);
+  return (sym);

While dlsym() returns NULL on error, it can also return NULL as a valid
address. The way you distinguish between these two conditions is to call
dlerror(). If dlerror() returns NULL, then the address is valid, 
otherwise it
is not.

thanks for pointing this out. i was about to address this, but noticed
that NULL is a not valid address on win32, so in the interest of promoting
cross-platform compatability in a library that's known for its
cross-platform compatability, and given this would seem to be a corner
case not frequently used, it seems better to leave as-is.



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