diff --git a/rtl/inc/compproc.inc b/rtl/inc/compproc.inc index 942ac2edea..6ab9f7e8d9 100644 --- a/rtl/inc/compproc.inc +++ b/rtl/inc/compproc.inc @@ -251,8 +251,8 @@ function fpc_do_as(aclass : tclass;aobject : tobject): tobject; compilerproc; procedure fpc_intf_decr_ref(var i: pointer); compilerproc; procedure fpc_intf_incr_ref(i: pointer); compilerproc; procedure fpc_intf_assign(var D: pointer; const S: pointer); compilerproc; -function fpc_intf_as(const S: pointer; const iid: TGUID): pointer; compilerproc; -function fpc_class_as_intf(const S: pointer; const iid: TGUID): pointer; compilerproc; +function fpc_intf_as(const S: pointer; const iid: TGUID): IInterface; compilerproc; +function fpc_class_as_intf(const S: pointer; const iid: TGUID): IInterface; compilerproc; Function fpc_PushExceptAddr (Ft: Longint;_buf,_newaddr : pointer): PJmp_buf ; compilerproc; Procedure fpc_PushExceptObj (Obj : TObject; AnAddr,AFrame : Pointer); compilerproc; diff --git a/rtl/inc/objpas.inc b/rtl/inc/objpas.inc index 2a1ce82bb2..362e061bbc 100644 --- a/rtl/inc/objpas.inc +++ b/rtl/inc/objpas.inc @@ -63,8 +63,7 @@ D:=S; end; - function fpc_intf_as(const S: pointer; const iid: TGUID): pointer;[public,alias: 'FPC_INTF_AS']; compilerproc; - + function fpc_intf_as(const S: pointer; const iid: TGUID): IInterface;[public,alias: 'FPC_INTF_AS']; compilerproc; var tmpi: pointer; // _AddRef before _Release begin @@ -72,14 +71,14 @@ begin if IUnknown(S).QueryInterface(iid,tmpi)<>S_OK then handleerror(219); - fpc_intf_as:=tmpi; + pointer(fpc_intf_as):=tmpi; end else fpc_intf_as:=nil; end; - function fpc_class_as_intf(const S: pointer; const iid: TGUID): pointer;[public,alias: 'FPC_CLASS_AS_INTF']; compilerproc; + function fpc_class_as_intf(const S: pointer; const iid: TGUID): IInterface;[public,alias: 'FPC_CLASS_AS_INTF']; compilerproc; var tmpi: pointer; // _AddRef before _Release @@ -88,7 +87,7 @@ begin if not TObject(S).GetInterface(iid,tmpi) then handleerror(219); - fpc_class_as_intf:=tmpi; + pointer(fpc_class_as_intf):=tmpi; end else fpc_class_as_intf:=nil;