gnustep-dev
[Top][All Lists]
Advanced

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

Re: Problem with string replacement


From: Fred Kiefer
Subject: Re: Problem with string replacement
Date: Fri, 28 Oct 2011 16:50:03 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.23) Gecko/20110920 SUSE/3.1.15 Thunderbird/3.1.15

On 28.10.2011 16:34, Richard Frith-Macdonald wrote:

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.

Thank you, this fixed the problem for me!

Could you please explain, why the internal representation got changed
here? I would expect that "\" is also representable in 8 bits.



reply via email to

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