Re: [xml] [PATCH] DSO/Module Support
- From: Joel Reed <joelwreed comcast net>
- To: Bjorn Reese <breese mail1 stofanet dk>
- Cc: xml gnome org
- Subject: Re: [xml] [PATCH] DSO/Module Support
- Date: Tue, 21 Dec 2004 21:23:14 -0500
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.
jr
ref: http://msdn.microsoft.com/library/en-us/dllproc/base/getprocaddress.asp?frame=true
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]