mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-10 11:09:16 +02:00
+ add a method to tdef to initialize the defid from within a constructor
git-svn-id: trunk@43624 -
This commit is contained in:
parent
b8a78b135c
commit
80a4a01f12
@ -55,6 +55,9 @@ interface
|
||||
protected
|
||||
{ whether this def is already registered in the unit's def list }
|
||||
function registered : boolean;
|
||||
{ initialize the defid field; only call from a constructor as it threats
|
||||
0 as an invalid value! }
|
||||
procedure init_defid;
|
||||
public
|
||||
typesym : tsym; { which type the definition was generated this def }
|
||||
{ stabs debugging }
|
||||
@ -273,6 +276,13 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
procedure tdef.init_defid;
|
||||
begin
|
||||
if defid=0 then
|
||||
defid:=defid_not_registered;
|
||||
end;
|
||||
|
||||
|
||||
constructor tdef.create(dt:tdeftyp);
|
||||
begin
|
||||
inherited create;
|
||||
@ -282,7 +292,7 @@ implementation
|
||||
defoptions:=[];
|
||||
dbg_state:=dbg_state_unused;
|
||||
stab_number:=0;
|
||||
defid:=defid_not_registered;
|
||||
init_defid;
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user