From cdcc2792edd4a0e5153c8df7a3f51c987ca42c26 Mon Sep 17 00:00:00 2001 From: egrange Date: Tue, 25 Jan 2022 11:00:40 +0100 Subject: [PATCH] Expose GetDataPtr in IInfo --- Source/dwsInfo.pas | 1 + Source/dwsInfoClasses.pas | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/Source/dwsInfo.pas b/Source/dwsInfo.pas index 2636952a..13a57542 100644 --- a/Source/dwsInfo.pas +++ b/Source/dwsInfo.pas @@ -38,6 +38,7 @@ interface function GetConstructor(const MethName: String; ExtObject: TObject): IInfo; function GetData : TData; function GetExternalObject: TObject; + function GetDataPtr : IDataContext; function GetMember(const s: String): IInfo; function GetFieldMemberNames : TStrings; function GetMethod(const s: String): IInfo; diff --git a/Source/dwsInfoClasses.pas b/Source/dwsInfoClasses.pas index 55a5399d..7cab37f5 100644 --- a/Source/dwsInfoClasses.pas +++ b/Source/dwsInfoClasses.pas @@ -54,6 +54,7 @@ TInfo = class (TInterfacedObject, IUnknown, IInfo) function GetData : TData; virtual; function GetExternalObject : TObject; virtual; + function GetDataPtr : IDataContext; virtual; function GetMember(const s : String) : IInfo; virtual; function GetFieldMemberNames : TStrings; virtual; function GetMethod(const s : String) : IInfo; virtual; @@ -415,6 +416,13 @@ function TInfo.GetExternalObject: TObject; raise Exception.CreateFmt(RTE_InvalidOp, ['ExternalObject', FTypeSym.Caption]); end; +// GetDataPtr +// +function TInfo.GetDataPtr : IDataContext; +begin + Result := FDataPtr; +end; + // GetMember // function TInfo.GetMember(const s : String) : IInfo;