octave-maintainers
[Top][All Lists]
Advanced

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

Re: Problem with an oct file that won't load


From: John Swensen
Subject: Re: Problem with an oct file that won't load
Date: Thu, 23 Oct 2008 15:09:07 -0400


On Oct 23, 2008, at 3:02 PM, John W. Eaton wrote:

On 23-Oct-2008, John Swensen wrote:

| Attached is a patch to give more information when it fails to load on | OSX. FYI, as of OSX 10.5 dlopen is the preferred method and all these
| NS* functions are deprecated.
|
| John Swensen
|
| -           (*current_liboctave_error_handler)
| -             ("couldn't link module %s", file.c_str ());   
| +           NSLinkEditErrors ler;
| +           int lerno;
| +           const char *file2;
| +           const char *errstr = NULL;
| +           NSLinkEditError (&ler, &lerno, &file2, &errstr);
| +           if (errstr)
| +             {
| +               (*current_liboctave_error_handler)
| + ("couldn't link module %s because of error condition:\n%s", file.c_str (), errstr);

Does NSLinkEditError allocate memory for file2 and errstr, or are they
set to point to static arrays?  If it is allocated, do we need to free
it, or is it managed entirely by the NSLinkEditError function?

jwe
I'm pretty sure that they are NOT allocated. There is a buffer somewhere else that maintains the most recent error and its source.

John


reply via email to

[Prev in Thread] Current Thread [Next in Thread]