Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Source/WrapDelphi.pas
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ TPyDelphiWrapper = class(TEngineClient, IFreeNotificationSubscriber)
function RegisterHelperType(APyObjectClass : TPyObjectClass) : TPythonType;
function RegisterFunction(AFuncName : PAnsiChar; AFunc : PyCFunction; ADocString : PAnsiChar ): PPyMethodDef; overload;
function RegisterFunction(AFuncName : PAnsiChar; AFunc : TDelphiMethod; ADocString : PAnsiChar ): PPyMethodDef; overload;
function GetHelperType(TypeName : string) : TPythonType;
function GetHelperType(const TypeName : string) : TPythonType;
// Function that provides a Python object wrapping an object
function Wrap(AObj : TObject; AOwnership: TObjectOwnership = soReference) : PPyObject;
{$IFDEF EXTENDED_RTTI}
Expand All @@ -845,7 +845,7 @@ TPyDelphiWrapper = class(TEngineClient, IFreeNotificationSubscriber)
// Function that provides a Python object wrapping an interface
// Note the the interface must be compiled in {$M+} mode and have a guid
// Usage: WrapInterface(TValue.From(YourInterfaceReference))
function WrapInterface(IValue: TValue): PPyObject;
function WrapInterface(const IValue: TValue): PPyObject;
{$ENDIF}
// properties
property EventHandlers : TEventHandlers read fEventHandlerList;
Expand Down Expand Up @@ -1892,7 +1892,7 @@ function GetRttiAttr(ParentAddr: Pointer; ParentType: TRttiStructuredType;
end;

function SetRttiAttr(const ParentAddr: Pointer; ParentType: TRttiStructuredType;
AttrName: string; Value: PPyObject; PyDelphiWrapper: TPyDelphiWrapper;
const AttrName: string; Value: PPyObject; PyDelphiWrapper: TPyDelphiWrapper;
out ErrMsg: string): Boolean;
var
Prop: TRttiProperty;
Expand Down Expand Up @@ -3562,7 +3562,7 @@ procedure TPyDelphiWrapper.Finalize;
fEventHandlerList.Clear;
end;

function TPyDelphiWrapper.GetHelperType(TypeName: string): TPythonType;
function TPyDelphiWrapper.GetHelperType(const TypeName: string): TPythonType;
var
Index : integer;
begin
Expand Down Expand Up @@ -3780,7 +3780,7 @@ function TPyDelphiWrapper.WrapRecord(Address: Pointer; Typ: TRttiStructuredType)
end;
end;

function TPyDelphiWrapper.WrapInterface(IValue: TValue): PPyObject;
function TPyDelphiWrapper.WrapInterface(const IValue: TValue): PPyObject;
var
PythonType: TPythonType;
Address: Pointer;
Expand Down
4 changes: 2 additions & 2 deletions Source/WrapFireDAC.pas
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ TPyFireDACRegistration = class(TRegisteredUnit)
procedure DefineVars(APyDelphiWrapper : TPyDelphiWrapper); override;
end;

function SqlTimeToVarDate(V : Variant) : Variant;
function SqlTimeToVarDate(const V : Variant) : Variant;

implementation

Expand Down Expand Up @@ -2230,7 +2230,7 @@ procedure TPyFireDACRegistration.RegisterWrappers(
APyDelphiWrapper.RegisterDelphiWrapper(TPyDBField);
end;

function SqlTimeToVarDate(V : Variant) : Variant;
function SqlTimeToVarDate(const V : Variant) : Variant;
begin
if VarIsSQLTimeStamp(V) or VarIsSQLTimeStampOffset(V) then
VarCast(Result, V, varDate)
Expand Down