mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-07 11:10:59 +01:00
* make the reference to the TCustomAttribute type global
git-svn-id: trunk@42393 -
This commit is contained in:
parent
d9d2515ada
commit
0b63e89ba2
@ -72,14 +72,11 @@ implementation
|
||||
cpuinfo
|
||||
;
|
||||
|
||||
var
|
||||
system_custom_attribute_def: tobjectdef = nil;
|
||||
|
||||
function is_system_custom_attribute_descendant(def:tdef):boolean;
|
||||
begin
|
||||
if system_custom_attribute_def=nil then
|
||||
system_custom_attribute_def:=tobjectdef(search_system_type('TCUSTOMATTRIBUTE').typedef);
|
||||
Result:=def_is_related(def,system_custom_attribute_def);
|
||||
if not assigned(class_tcustomattribute) then
|
||||
class_tcustomattribute:=tobjectdef(search_system_type('TCUSTOMATTRIBUTE').typedef);
|
||||
Result:=def_is_related(def,class_tcustomattribute);
|
||||
end;
|
||||
|
||||
function readconstant(const orgname:string;const filepos:tfileposinfo; out nodetype: tnodetype):tconstsym;
|
||||
@ -449,7 +446,7 @@ implementation
|
||||
|
||||
{ Check if the attribute class is related to TCustomAttribute }
|
||||
if not is_system_custom_attribute_descendant(od) then
|
||||
incompatibletypes(od,system_custom_attribute_def);
|
||||
incompatibletypes(od,class_tcustomattribute);
|
||||
|
||||
paran:=read_attr_paras;
|
||||
|
||||
|
||||
@ -1147,6 +1147,8 @@ interface
|
||||
|
||||
{ pointer to the anchestor of all classes }
|
||||
class_tobject : tobjectdef;
|
||||
{ pointer to the base type for custom attributes }
|
||||
class_tcustomattribute : tobjectdef;
|
||||
{ pointer to the ancestor of all COM interfaces }
|
||||
interface_iunknown : tobjectdef;
|
||||
{ pointer to the ancestor of all dispinterfaces }
|
||||
|
||||
@ -4714,6 +4714,7 @@ implementation
|
||||
{$endif}
|
||||
{ set some global vars to nil, might be important for the ide }
|
||||
class_tobject:=nil;
|
||||
class_tcustomattribute:=nil;
|
||||
interface_iunknown:=nil;
|
||||
interface_idispatch:=nil;
|
||||
rec_tguid:=nil;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user