merge r14123 from cpstrnew branch by paul:

fix string ref count for empty strings

git-svn-id: trunk@19089 -
This commit is contained in:
paul 2011-09-17 11:27:05 +00:00
parent 5e9ee14ee7
commit afa559ab2e
2 changed files with 2 additions and 2 deletions

View File

@ -1141,7 +1141,7 @@ function StringRefCount(const S: RawByteString): SizeInt; overload;
if assigned(Pointer(S)) then
Result:=PAnsiRec(pointer(S)-AnsiFirstOff)^.Ref
else
Result:=SizeOf(AnsiChar);
Result:=0;
end;

View File

@ -2564,7 +2564,7 @@ function StringRefCount(const S: UnicodeString): SizeInt; overload;
if assigned(Pointer(S)) then
Result:=PUnicodeRec(pointer(S)-UnicodeFirstOff)^.Ref
else
Result:=SizeOf(UnicodeChar);
Result:=0;
end;