mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 20:29:23 +02:00
* just realized that AnsiStrPas is entirely unnecessary, because typecasting a
pchar to ansistring performs exactly the same thing :) git-svn-id: trunk@30056 -
This commit is contained in:
parent
9d1c9a2a6a
commit
547e20f1a2
@ -109,17 +109,6 @@ begin
|
|||||||
{$endif windows}
|
{$endif windows}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function AnsiStrPas(S: PChar): AnsiString;
|
|
||||||
var
|
|
||||||
Res: AnsiString;
|
|
||||||
Len: LongInt;
|
|
||||||
begin
|
|
||||||
Len := StrLen(S);
|
|
||||||
SetLength(Res, Len);
|
|
||||||
Move(S^, Res[1], Len);
|
|
||||||
AnsiStrPas := Res;
|
|
||||||
end;
|
|
||||||
|
|
||||||
constructor TGDBController.Init;
|
constructor TGDBController.Init;
|
||||||
begin
|
begin
|
||||||
inherited Init;
|
inherited Init;
|
||||||
@ -317,7 +306,7 @@ begin
|
|||||||
if GDB.ResultRecord.Success then
|
if GDB.ResultRecord.Success then
|
||||||
PrintCommand:=GDB.ResultRecord.Parameters['value'].AsString
|
PrintCommand:=GDB.ResultRecord.Parameters['value'].AsString
|
||||||
else
|
else
|
||||||
PrintCommand:=AnsiStrPas(GetError);
|
PrintCommand:=AnsiString(GetError);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
const
|
const
|
||||||
@ -330,7 +319,7 @@ begin
|
|||||||
if GDB.ResultRecord.Success then
|
if GDB.ResultRecord.Success then
|
||||||
PrintFormattedCommand:=GDB.ResultRecord.Parameters['value'].AsString
|
PrintFormattedCommand:=GDB.ResultRecord.Parameters['value'].AsString
|
||||||
else
|
else
|
||||||
PrintFormattedCommand:=AnsiStrPas(GetError);
|
PrintFormattedCommand:=AnsiString(GetError);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TGDBController.BreakpointInsert(const location: string; BreakpointFlags: TBreakpointFlags): LongInt;
|
function TGDBController.BreakpointInsert(const location: string; BreakpointFlags: TBreakpointFlags): LongInt;
|
||||||
|
@ -177,17 +177,6 @@ begin
|
|||||||
{$endif win32}
|
{$endif win32}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function AnsiStrPas(S: PChar): AnsiString;
|
|
||||||
var
|
|
||||||
Res: AnsiString;
|
|
||||||
Len: LongInt;
|
|
||||||
begin
|
|
||||||
Len := StrLen(S);
|
|
||||||
SetLength(Res, Len);
|
|
||||||
Move(S^, Res[1], Len);
|
|
||||||
AnsiStrPas := Res;
|
|
||||||
end;
|
|
||||||
|
|
||||||
constructor TGDBController.Init;
|
constructor TGDBController.Init;
|
||||||
begin
|
begin
|
||||||
inherited init;
|
inherited init;
|
||||||
@ -484,9 +473,9 @@ begin
|
|||||||
while p^ in [' ',#9] do
|
while p^ in [' ',#9] do
|
||||||
inc(p);
|
inc(p);
|
||||||
if assigned(p) then
|
if assigned(p) then
|
||||||
InternalGetValue:=AnsiStrPas(p)
|
InternalGetValue:=AnsiString(p)
|
||||||
else
|
else
|
||||||
InternalGetValue:=AnsiStrPas(GetError);
|
InternalGetValue:=AnsiString(GetError);
|
||||||
if assigned(p3) then
|
if assigned(p3) then
|
||||||
p3^:=#10;
|
p3^:=#10;
|
||||||
got_error:=false;
|
got_error:=false;
|
||||||
|
Loading…
Reference in New Issue
Block a user