mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 13:09:22 +02:00
* set also publishable flag if forward classes are compile within $M+
git-svn-id: trunk@1998 -
This commit is contained in:
parent
47c1bb60b4
commit
22923c12d5
@ -149,14 +149,16 @@ implementation
|
|||||||
if classtype in [odt_interfacecom,odt_class] then
|
if classtype in [odt_interfacecom,odt_class] then
|
||||||
begin
|
begin
|
||||||
aktobjectdef.objecttype:=classtype;
|
aktobjectdef.objecttype:=classtype;
|
||||||
|
{ set published flag in $M+ mode or it is inherited }
|
||||||
if (cs_generate_rtti in aktlocalswitches) or
|
if (cs_generate_rtti in aktlocalswitches) or
|
||||||
(assigned(aktobjectdef.childof) and
|
(assigned(aktobjectdef.childof) and
|
||||||
(oo_can_have_published in aktobjectdef.childof.objectoptions)) then
|
(oo_can_have_published in aktobjectdef.childof.objectoptions)) then
|
||||||
begin
|
include(aktobjectdef.objectoptions,oo_can_have_published);
|
||||||
include(aktobjectdef.objectoptions,oo_can_have_published);
|
{ in "publishable" classes the default access type is published, this is
|
||||||
{ in "publishable" classes the default access type is published }
|
done separate from above if-statement because the option can be
|
||||||
current_object_option:=[sp_published];
|
inherited from the forward class definition }
|
||||||
end;
|
if (oo_can_have_published in aktobjectdef.objectoptions) then
|
||||||
|
current_object_option:=[sp_published];
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -243,6 +245,9 @@ implementation
|
|||||||
(classtype=odt_interfacecom) and (upper(n)='IUNKNOWN') then
|
(classtype=odt_interfacecom) and (upper(n)='IUNKNOWN') then
|
||||||
interface_iunknown:=aktobjectdef;
|
interface_iunknown:=aktobjectdef;
|
||||||
include(aktobjectdef.objectoptions,oo_is_forward);
|
include(aktobjectdef.objectoptions,oo_is_forward);
|
||||||
|
if (cs_generate_rtti in aktlocalswitches) and
|
||||||
|
(classtype=odt_interfacecom) then
|
||||||
|
include(aktobjectdef.objectoptions,oo_can_have_published);
|
||||||
object_dec:=aktobjectdef;
|
object_dec:=aktobjectdef;
|
||||||
typecanbeforward:=storetypecanbeforward;
|
typecanbeforward:=storetypecanbeforward;
|
||||||
readobjecttype:=false;
|
readobjecttype:=false;
|
||||||
@ -294,10 +299,11 @@ implementation
|
|||||||
class_tobject:=aktobjectdef;
|
class_tobject:=aktobjectdef;
|
||||||
aktobjectdef.objecttype:=odt_class;
|
aktobjectdef.objecttype:=odt_class;
|
||||||
include(aktobjectdef.objectoptions,oo_is_forward);
|
include(aktobjectdef.objectoptions,oo_is_forward);
|
||||||
|
if (cs_generate_rtti in aktlocalswitches) then
|
||||||
|
include(aktobjectdef.objectoptions,oo_can_have_published);
|
||||||
{ all classes must have a vmt !! at offset zero }
|
{ all classes must have a vmt !! at offset zero }
|
||||||
if not(oo_has_vmt in aktobjectdef.objectoptions) then
|
if not(oo_has_vmt in aktobjectdef.objectoptions) then
|
||||||
aktobjectdef.insertvmt;
|
aktobjectdef.insertvmt;
|
||||||
|
|
||||||
object_dec:=aktobjectdef;
|
object_dec:=aktobjectdef;
|
||||||
typecanbeforward:=storetypecanbeforward;
|
typecanbeforward:=storetypecanbeforward;
|
||||||
readobjecttype:=false;
|
readobjecttype:=false;
|
||||||
@ -523,19 +529,6 @@ implementation
|
|||||||
{ read list of parent classes }
|
{ read list of parent classes }
|
||||||
readparentclasses;
|
readparentclasses;
|
||||||
|
|
||||||
(*
|
|
||||||
{ keep reference to implicit parent classes }
|
|
||||||
if (cs_compilesystem in aktmoduleswitches) then
|
|
||||||
begin
|
|
||||||
if (classtype=odt_class) and
|
|
||||||
(upper(n)='TOBJECT') then
|
|
||||||
class_tobject:=aktobjectdef
|
|
||||||
else if (classtype=odt_interfacecom) and
|
|
||||||
(upper(n)='IUNKNOWN') then
|
|
||||||
interface_iunknown:=aktobjectdef;
|
|
||||||
end;
|
|
||||||
*)
|
|
||||||
|
|
||||||
{ default access is public }
|
{ default access is public }
|
||||||
there_is_a_destructor:=false;
|
there_is_a_destructor:=false;
|
||||||
current_object_option:=[sp_public];
|
current_object_option:=[sp_public];
|
||||||
|
Loading…
Reference in New Issue
Block a user