TIniFiles and $H+ issue

Michael A. Hess mhess at miraclec.com
Thu Apr 29 13:56:03 EDT 1999


Michael Van Canneyt wrote:
>
> Good question. I understand that there is a bug somewhere, but I
> haven't been able to find the 'minimal code snippet' to produce
> the error.
> 
> Technically speaking, what happened is:
> Normally, a empty ansistring is a nil pointer;
> For some reason, your code passed (don't know how) pointer to #0
> which is, strictly speaking, NOT equal to an empty string.
> (although it is if you use a pchar)

I understand this. That is what I discovered during my debugging but
since I assumed that {$mode Delphi} already set for longstrings I never
tried the {$H+} setting,

> This got the internal ansistring code of the RTL confused, hence
> the error.
> 
> But, like I said, I didn't find the minimal code that produces
> this bug :(

So again what is your advice? Should we ALWAYS be using the {$H+} option
for anything we write using the FCL? If that is the case can we include
that as part of the {$mode delphi} option, since that is normal delphi
configuration since Delphi 2?

I'm also curious how long does it take for your submission to CVS to go
through? I just tried and update and the inifiles.pp files update was
there but nothing for ezcgi yet. Again just curious.  :-)

-- 
==== Programming my first best destiny! ====

Michael A. Hess      Miracle Concepts, Inc.
mhess at miraclec.com   http://www.miraclec.com






More information about the Lazarus mailing list