RE: cdecl support
kbochert at ix.netcom.com wrote:
> -------Phoenix-Boundary-07081998-
> Content-type: text/plain; charset=ISO-8859-1
> Content-transfer-encoding: 8bit
>
> Hi Andy Serpa, you wrote on 2/25/02 4:29:54 PM:
>
> >
> >That's what I did with the Karl's regex wrapper, which crashes when
> >translated due to this problem.
> >
>
> What is 'this problem' ?
>
> Karl
>
The functions in the .dll are supposed to be called using cdecl
(Remember the thread a month or so back when I brought this up? Look up
thread "Program crash with regex wrapper after translation" from
January.) -- it works only by luck because of the way Watcom compiles
(apparently) when using the interpreter, but crashes if you translate it
to C with Borland or LCC. Specifically, it crashes with any call to
regex_free, but I noticed later that you get corruption in general with
any call.
Your wrapper isn't the only one, as I noted -- the SQL lite library and
probably a bunch of others will not work when translated, and only
"happen" to work with the interpreter -- in other words, you are on
shaky ground period with any .dll that expects cdecl calls, which
outside of the WinAPI, is a lot of them. Practically anything that has
been ported from UNIX, or is not Windows-specific will have this problem
I imagine. In any case, this instability was enough for me to keep away
from these libraries, even with the interpreter. But with my middleman
.dll, all is well, if inelegant.
Andy Serpa
renegade at earthling.net
|
Not Categorized, Please Help
|
|