[m-rev.] diff: fix string_contains_char bug

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Aug 7 10:31:27 AEST 2002


On 07-Aug-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> 
> library/string.m:
> 	Fix a bug in string__contains_char which broke
> 	Fergus's string quoting change, causing C compilation
> 	errors due to ill-formed char constants in the generated
> 	code.

Sorry about that.  After bootchecking the change,
I realized that the code was not written as efficiently
as possible -- I changed the order of the tests so that it tested
for "\0" after testing for C source code characters, on the
grounds that "\0" was going to be less frequent.
Since the two tests were "obviously" mutually exclusive,
reordering them couldn't change the semantics -- or so I thought.
Hence I didn't bother to re-bootcheck before committing.

Thanks for fixing this.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list