mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 02:48:07 +02:00
* instead of using discardresult, wrap the uniquestring functions in procedures,
that are declared as inline git-svn-id: trunk@49016 -
This commit is contained in:
parent
b9affc3406
commit
800bb3adc2
@ -872,6 +872,15 @@ end;
|
||||
{$endif FPC_SYSTEM_HAS_TRUELY_ANSISTR_UNIQUE}
|
||||
|
||||
|
||||
Function fpc_ansistr_Unique_func(Var S : RawByteString): Pointer; external name 'FPC_ANSISTR_UNIQUE';
|
||||
|
||||
|
||||
Procedure UniqueString(var S : RawByteString);{$ifdef FPC_HAS_CPSTRING}rtlproc;{$endif FPC_HAS_CPSTRING}{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
begin
|
||||
fpc_ansistr_Unique_func(S);
|
||||
end;
|
||||
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_ANSISTR_UNIQUE}
|
||||
{$define FPC_SYSTEM_HAS_ANSISTR_UNIQUE}
|
||||
// MV: inline the basic checks for case that S is already unique.
|
||||
|
@ -1319,7 +1319,7 @@ function Pos(const substr : shortstring;c:char; Offset: Sizeint = 1): SizeInt;
|
||||
****************************************************************************}
|
||||
|
||||
{$ifdef FPC_HAS_FEATURE_ANSISTRINGS}
|
||||
Procedure UniqueString(var S : RawByteString);{$ifdef FPC_HAS_CPSTRING}rtlproc;{$endif FPC_HAS_CPSTRING}external name 'FPC_ANSISTR_UNIQUE';{$ifndef VER3_2}discardresult;{$endif VER3_2}
|
||||
Procedure UniqueString(var S : RawByteString);{$ifdef FPC_HAS_CPSTRING}rtlproc;{$endif FPC_HAS_CPSTRING}{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function Pos (const Substr : RawByteString; const Source : RawByteString; Offset: Sizeint = 1) : SizeInt;
|
||||
Function Pos (c : AnsiChar; const s : RawByteString; Offset: Sizeint = 1) : SizeInt;
|
||||
{$ifdef VER3_0}
|
||||
|
@ -15,7 +15,7 @@
|
||||
**********************************************************************}
|
||||
|
||||
|
||||
Procedure UniqueString (Var S : UnicodeString);external name 'FPC_UNICODESTR_UNIQUE';{$ifndef VER3_2}discardresult;{$endif VER3_2}
|
||||
Procedure UniqueString (Var S : UnicodeString);{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function Pos (Const Substr : UnicodeString; Const Source : UnicodeString; Offset: Sizeint = 1) : SizeInt;
|
||||
Function Pos (c : Char; Const s : UnicodeString; Offset: Sizeint = 1) : SizeInt;
|
||||
Function Pos (c : UnicodeChar; Const s : UnicodeString; Offset: Sizeint = 1) : SizeInt;
|
||||
|
@ -1104,6 +1104,15 @@ procedure WideCharToStrVar(S : PWideChar;out Dest : AnsiString);
|
||||
end;
|
||||
|
||||
|
||||
Function fpc_unicodestr_Unique_func(Var S : UnicodeString): Pointer; external name 'FPC_UNICODESTR_UNIQUE';
|
||||
|
||||
|
||||
Procedure UniqueString (Var S : UnicodeString);{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
begin
|
||||
fpc_unicodestr_Unique_func(S);
|
||||
end;
|
||||
|
||||
|
||||
{$ifndef FPC_HAS_UNICODESTR_UNIQUE}
|
||||
{$define FPC_HAS_UNICODESTR_UNIQUE}
|
||||
Function fpc_unicodestr_Unique(Var S : Pointer): Pointer; [Public,Alias : 'FPC_UNICODESTR_UNIQUE']; compilerproc;
|
||||
|
@ -15,7 +15,7 @@
|
||||
**********************************************************************}
|
||||
|
||||
|
||||
Procedure UniqueString (Var S : WideString);external name 'FPC_WIDESTR_UNIQUE';{$ifndef VER3_2}discardresult;{$endif VER3_2}
|
||||
Procedure UniqueString (Var S : WideString);{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
Function Pos (Const Substr : WideString; Const Source : WideString; Offset : SizeInt = 1) : SizeInt;
|
||||
Function Pos (c : Char; Const s : WideString; Offset : SizeInt = 1) : SizeInt;
|
||||
Function Pos (c : WideChar; Const s : WideString; Offset : SizeInt = 1) : SizeInt;
|
||||
|
@ -546,6 +546,15 @@ end;
|
||||
Public functions, In interface.
|
||||
*****************************************************************************}
|
||||
|
||||
Function fpc_widestr_Unique_func(Var S : WideString): Pointer; external name 'FPC_WIDESTR_UNIQUE';
|
||||
|
||||
|
||||
Procedure UniqueString (Var S : WideString);{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
begin
|
||||
fpc_widestr_Unique_func(S);
|
||||
end;
|
||||
|
||||
|
||||
Function fpc_widestr_Unique(Var S : Pointer): Pointer; [Public,Alias : 'FPC_WIDESTR_UNIQUE']; compilerproc;
|
||||
begin
|
||||
pointer(result) := pointer(s);
|
||||
|
Loading…
Reference in New Issue
Block a user