mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-02 17:02:31 +02:00
* Change Field passing type of FreeLocalVerbosity parameter
to by value to avoid passing an unaligned pointer. * Adapt code calling FreeLocalVerbosity to reset currrent_settings.pmessage to nil afterwards. git-svn-id: trunk@18978 -
This commit is contained in:
parent
50067bf42a
commit
713f269ce2
@ -522,6 +522,7 @@ implementation
|
|||||||
set_current_module(olddata^.old_current_module);
|
set_current_module(olddata^.old_current_module);
|
||||||
|
|
||||||
FreeLocalVerbosity(current_settings.pmessage);
|
FreeLocalVerbosity(current_settings.pmessage);
|
||||||
|
current_settings.pmessage:=nil;
|
||||||
|
|
||||||
dispose(olddata);
|
dispose(olddata);
|
||||||
end;
|
end;
|
||||||
|
@ -82,7 +82,7 @@ interface
|
|||||||
function CheckVerbosity(v:longint):boolean;
|
function CheckVerbosity(v:longint):boolean;
|
||||||
function SetMessageVerbosity(v:longint;state:tmsgstate):boolean;
|
function SetMessageVerbosity(v:longint;state:tmsgstate):boolean;
|
||||||
procedure RestoreLocalVerbosity(pstate : pmessagestaterecord);
|
procedure RestoreLocalVerbosity(pstate : pmessagestaterecord);
|
||||||
procedure FreeLocalVerbosity(var fstate : pmessagestaterecord);
|
procedure FreeLocalVerbosity(fstate : pmessagestaterecord);
|
||||||
|
|
||||||
function ChangeMessageVerbosity(s: string; var i: integer;state:tmsgstate): boolean;
|
function ChangeMessageVerbosity(s: string; var i: integer;state:tmsgstate): boolean;
|
||||||
procedure ShowStatus;
|
procedure ShowStatus;
|
||||||
@ -191,7 +191,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure FreeLocalVerbosity(var fstate : pmessagestaterecord);
|
procedure FreeLocalVerbosity(fstate : pmessagestaterecord);
|
||||||
var pstate : pmessagestaterecord;
|
var pstate : pmessagestaterecord;
|
||||||
begin
|
begin
|
||||||
pstate:=fstate;
|
pstate:=fstate;
|
||||||
@ -199,7 +199,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
fstate:=pstate^.next;
|
fstate:=pstate^.next;
|
||||||
freemem(pstate);
|
freemem(pstate);
|
||||||
pstate:=fstate;
|
pstate:=unaligned(fstate);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user