Browse Source

* Const string in StrP(L)Copy (bug report 26100)

git-svn-id: trunk@27763 -
michael 11 years ago
parent
commit
276a273e6c
2 changed files with 4 additions and 4 deletions
  1. 2 2
      rtl/objpas/sysutils/syspch.inc
  2. 2 2
      rtl/objpas/sysutils/syspchh.inc

+ 2 - 2
rtl/objpas/sysutils/syspch.inc

@@ -67,7 +67,7 @@ end;
 
 
 {  StrPCopy copies the pascal string Source to Dest and returns Dest  }
 {  StrPCopy copies the pascal string Source to Dest and returns Dest  }
 
 
-function StrPCopy(Dest: PChar; Source: string): PChar;overload;
+function StrPCopy(Dest: PChar; Const Source: string): PChar;overload;
 begin
 begin
   result := StrMove(Dest, PChar(Source), length(Source)+1);
   result := StrMove(Dest, PChar(Source), length(Source)+1);
 end ;
 end ;
@@ -75,7 +75,7 @@ end ;
 {  StrPLCopy copies MaxLen or less characters from the pascal string
 {  StrPLCopy copies MaxLen or less characters from the pascal string
    Source to Dest and returns Dest  }
    Source to Dest and returns Dest  }
 
 
-function StrPLCopy(Dest: PChar; Source: string; MaxLen: SizeUInt): PChar;overload;
+function StrPLCopy(Dest: PChar; Const Source: string; MaxLen: SizeUInt): PChar;overload;
 var Count: SizeUInt;
 var Count: SizeUInt;
 begin
 begin
 result := Dest;
 result := Dest;

+ 2 - 2
rtl/objpas/sysutils/syspchh.inc

@@ -36,8 +36,8 @@ function strnew(p : pchar) : pchar; overload;
 
 
 { Different from strings unit - ansistrings or different behaviour }
 { Different from strings unit - ansistrings or different behaviour }
 function StrPas(Str: PChar): string;overload;
 function StrPas(Str: PChar): string;overload;
-function StrPCopy(Dest: PChar; Source: string): PChar;overload;
-function StrPLCopy(Dest: PChar; Source: string; MaxLen: SizeUInt): PChar;overload;
+function StrPCopy(Dest: PChar; Const Source: string): PChar;overload;
+function StrPLCopy(Dest: PChar; Const Source: string; MaxLen: SizeUInt): PChar;overload;
 function StrAlloc(Size: cardinal): PChar;
 function StrAlloc(Size: cardinal): PChar;
 function StrBufSize(Str: PChar): Cardinal;
 function StrBufSize(Str: PChar): Cardinal;
 procedure StrDispose(Str: PChar);
 procedure StrDispose(Str: PChar);