Subject: Re: [linux-audio-dev] LADSPA Update, New Project (CMT) & Help Requested
From: Paul Barton-Davis (pbd_AT_Op.Net)
Date: Fri May 05 2000 - 10:11:32 EEST
> func = dlsym(dlhandle,"ladspa_descriptor");
> if (func == NULL) {
> /* check if we really got an error */
> error = dlerror(); /* save because next call to dlerror() returns NULL */
> if (error != NULL) {
> /* my error code deleted */
> }
> /* else the NULL is a valid function address */
> }
this code is wrong. it should be:
func = dlsym(dlhandle,"ladspa_descriptor");
if ((error = dlerror()) == NULL) {
... handle error ...
}
... func points to a valid symbol ...
func is allowed to be zero. its a pointer to a symbol, not necessarily
a function.
--p
This archive was generated by hypermail 2b28 : Fri May 05 2000 - 11:13:50 EEST