gnustep-dev
[Top][All Lists]
Advanced

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

Re: Problem with string replacement


From: Richard Frith-Macdonald
Subject: Re: Problem with string replacement
Date: Fri, 28 Oct 2011 15:34:09 +0100

On 28 Oct 2011, at 13:25, Fred Kiefer wrote:

> On 28.10.2011 14:13, Richard Frith-Macdonald wrote:
>> 
>> On 28 Oct 2011, at 12:21, Fred Kiefer wrote:

>>> 
>>> Could somebody please explain this to me? If this is an actual
>>> problem I would like to add the above code into the NSMutableString
>>> tests.
>> 
>> Please add it to the tests ... I'll have a look at it.
> 
> Done.
> 
>> I couldn't reproduce the problem on my main system, but on my 64bit
>> test system where I'm experimenting with clang it shows up ... so
>> it's probably a 64bit related issue.
> 
> If it only shows up on 64bit machines (I am using on) then maybe
> replacing all the occurrences of unsigned with NSUInteger in GSSeq.h may
> resolve the issue? I'll give that a try.

It turns out that it was not a 64bit error ... just luck that it showed up 
there and not on other systems.  The problem was with caching the function to 
locate the substring ... if replacing part of the mutable string caused it to 
be widened  from 8bit to 16bit data, the cached function was no longer correct 
for the internal data representation.  I changed the code so that we refresh 
the function after each replacement.


reply via email to

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