* avoid unique call in ansistr_append

git-svn-id: trunk@1968 -
This commit is contained in:
florian 2005-12-15 22:55:20 +00:00
parent 53d7eafa7d
commit da9469c550

View File

@ -86,7 +86,7 @@ begin
end;
{$ifndef FPC_SYSTEM_HAS_ANSISTR_DECR_REF}
Procedure fpc_AnsiStr_Decr_Ref (Var S : Pointer); [Public,Alias:'FPC_ANSISTR_DECR_REF']; compilerproc;
Procedure fpc_ansistr_decr_ref (Var S : Pointer); [Public,Alias:'FPC_ANSISTR_DECR_REF']; compilerproc;
{
Decreases the ReferenceCount of a non constant ansistring;
If the reference count is zero, deallocate the string;
@ -110,7 +110,7 @@ end;
{$endif FPC_SYSTEM_HAS_ANSISTR_DECR_REF}
{ also define alias for internal use in the system unit }
Procedure fpc_AnsiStr_Decr_Ref (Var S : Pointer); [external name 'FPC_ANSISTR_DECR_REF'];
Procedure fpc_ansistr_decr_ref (Var S : Pointer); [external name 'FPC_ANSISTR_DECR_REF'];
Procedure fpc_AnsiStr_Incr_Ref (S : Pointer); [Public,Alias:'FPC_ANSISTR_INCR_REF']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
Begin
@ -463,7 +463,8 @@ begin
exit;
ofs:=Length(S);
SetLength(S,ofs+length(Str));
move(Str[1],S[ofs+1],length(Str));
{ the pbyte cast avoids an unique call which isn't necessary because SetLength was just called }
move(Str[1],(pointer(S)+ofs)^,length(Str));
PByte(Pointer(S)+length(S))^:=0; { Terminating Zero }
end;
@ -477,7 +478,8 @@ begin
strlength := length(str);
ofs:=Length(S);
SetLength(S,ofs+length(Str));
move(Str[1],S[ofs+1],strlength+1);
{ the pbyte cast avoids an unique call which isn't necessary because SetLength was just called }
move(Str[1],(pointer(S)+ofs)^,strlength+1);
end;
Function Fpc_Ansistr_Copy (Const S : AnsiString; Index,Size : SizeInt) : AnsiString;compilerproc;