From ed18ef848631e0c5bbad38f5bf9ffef3a72ab5cd Mon Sep 17 00:00:00 2001 From: mattias Date: Mon, 3 Aug 2020 20:53:53 +0000 Subject: [PATCH] codetools: added SetString overloads git-svn-id: branches/fixes_2_0@63682 - --- components/codetools/identcompletiontool.pas | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/components/codetools/identcompletiontool.pas b/components/codetools/identcompletiontool.pas index 0fcd8d8e25..7819351686 100644 --- a/components/codetools/identcompletiontool.pas +++ b/components/codetools/identcompletiontool.pas @@ -3266,8 +3266,16 @@ var AddCompilerProc('Seg','var X','LongInt'); AddCompilerProc('SetLength','var S:String;NewLength:Integer'); AddCompilerProc('SetLength','var A:Array;NewLength:Integer'); - if Scanner.Values.IsDefined('FPC_HAS_CPSTRING') then + if Scanner.Values.IsDefined('FPC_HAS_CPSTRING') then begin AddCompilerProc('SetString','out S:RawByteString;Buf:PAnsiChar;Len:SizeInt'); + AddCompilerProcedure('SetString','out S:AnsiString;Buf:PAnsiChar;Len:SizeInt'); + AddCompilerProcedure('SetString','out S:AnsiString;Buf:PWideChar;Len:SizeInt'); + AddCompilerProcedure('SetString','out S:ShortString;Buf:PChar;Len:SizeInt'); + AddCompilerProcedure('SetString','out S:UnicodeString;Buf:PUnicodeChar;Len:SizeInt'); + AddCompilerProcedure('SetString','out S:UnicodeString;Buf:PChar;Len:SizeInt'); + AddCompilerProcedure('SetString','out S:WideString;Buf:PWideChar;Len:SizeInt'); + AddCompilerProcedure('SetString','out S:WideString;Buf:PChar;Len:SizeInt'); + end; AddCompilerProc('SizeOf','Identifier','Integer'); AddCompilerProc('Slice','var A:Array;Count:Integer','Array'); AddCompilerProc('Str','const X[:Width[:Decimals]];var S:String');