RTTI for interfaces
Original Reporter info from Mantis: FPCCore
-
Reporter name: FPC core team
Original Reporter info from Mantis: FPCCore
- Reporter name: FPC core team
Description:
RTTI for interfaces is not supported.
Kylix:
Kind: tkInterface
Name: "itest2"
IntfParent: 135728812
Guid: 441492708
IntfUnit (1): "project1"
FPC:
Kind: tkInterface
Name: "itest2"
IntfParent: 0
IID: 0
IIDStr: ""
IntfUnit (1): ""
IntfUnit (2): ""
This is a showstopper for me.
Because of 4086 i have to use corba interface,
because of 4087 i can not use tobject.getinterface,
because of this issue i can not use the workaround below.
function tmsecomponent.getcorbainterface(const aintf: ptypeinfo; out obj) : boolean;
var
intf1: pinterfaceentry;
typedata1: ptypedata;
begin
typedata1:= gettypedata(aintf);
{$ifdef FPC}
intf1:= getinterfaceentrybystr(typedata1^.iidstr);
{$else}
intf1:= getinterfaceentry(typedata1^.guid);
{$endif}
if intf1 <> nil then begin
{$ifdef FPC}
pointer(obj):= pointer(self) + intf1^.ioffset;
{$else}
pointer(obj):= pointer(integer(self) + intf1^.ioffset);
{$endif}
end
else begin
pointer(obj):= nil;
result:= false;
end;
end;
Additional information:
Reporter: Martin Schreiber
EMail:
Mantis conversion info:
- Mantis ID: 6037
- OS: All
- Fixed in version: 2.0.2