浏览代码

* the pointer parameter of fpc_Read_Text_PChar_As_Pointer is not an
out parameter, but a const (the pointer is const and must be
valid already)

git-svn-id: trunk@2486 -

Jonas Maebe 19 年之前
父节点
当前提交
0e2a5dde24
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      rtl/inc/compproc.inc
  2. 1 1
      rtl/inc/text.inc

+ 1 - 1
rtl/inc/compproc.inc

@@ -194,7 +194,7 @@ procedure fpc_vararray_put(var d : variant;const s : variant;indices : psizeint;
 Procedure fpc_Read_End(var f:Text); compilerproc;
 Procedure fpc_ReadLn_End(var f : Text); compilerproc;
 Procedure fpc_Read_Text_ShortStr(var f : Text;out s : String); compilerproc;
-Procedure fpc_Read_Text_PChar_As_Pointer(var f : Text;out s : PChar); compilerproc;
+Procedure fpc_Read_Text_PChar_As_Pointer(var f : Text; const s : PChar); compilerproc;
 Procedure fpc_Read_Text_PChar_As_Array(var f : Text;out s : array of char); compilerproc;
 Procedure fpc_Read_Text_AnsiStr(var f : Text;out s : AnsiString); compilerproc;
 Procedure fpc_Read_Text_Char(var f : Text; out c : char); compilerproc;

+ 1 - 1
rtl/inc/text.inc

@@ -947,7 +947,7 @@ Begin
 End;
 
 
-Procedure fpc_Read_Text_PChar_As_Pointer(var f : Text;out s : PChar); iocheck; [Public,Alias:'FPC_READ_TEXT_PCHAR_AS_POINTER']; compilerproc;
+Procedure fpc_Read_Text_PChar_As_Pointer(var f : Text; const s : PChar); iocheck; [Public,Alias:'FPC_READ_TEXT_PCHAR_AS_POINTER']; compilerproc;
 Begin
   pchar(s+ReadPCharLen(f,s,$7fffffff))^:=#0;
 End;