[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lua 5.3.0 (rc3) now available
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 2 Jan 2015 15:40:29 -0200
> Additionally, the check should not be `f == NULL`. From man page:
> > Since the value of the symbol could actually be NULL (so that a NULL return from dlsym()
> > need not indicate an error), the correct way to test for an error is to call dlerror() to clear any
> > old error conditions, then call dlsym(), and then call dlerror() again, saving its return value into
> > a variable, and check whether this saved value is not NULL.
In our case, the symbol could not be NULL (as it must point to a valid
function), so a NULL return must be an error (maybe of a different sort,
but an error nonetheless).