Skip to content

Commit 38b228f

Browse files
committed
Use LoadDLLinExtensionModule instead of LoadDLL in RttiModule/uMain.pas
1 parent 4426ae3 commit 38b228f

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

Modules/DemoModule/uMain.pas

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ function PyInit_DemoModule: PPyObject;
4949
try
5050
gEngine := TPythonEngine.Create(nil);
5151
gEngine.AutoFinalize := False;
52-
gEngine.UseLastKnownVersion := False;
5352
gEngine.UseLastKnownVersion := True;
5453

5554
gModule := TPythonModule.Create(nil);

Modules/RttiModule/uMain.pas

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@ function PyInit_DemoModule: PPyObject;
3434
try
3535
gEngine := TPythonEngine.Create(nil);
3636
gEngine.AutoFinalize := False;
37-
gEngine.UseLastKnownVersion := False;
38-
// Adapt to the desired python version
39-
gEngine.RegVersion := '3.8';
40-
gEngine.DllName := 'python38.dll';
37+
gEngine.UseLastKnownVersion := True;
4138

4239
gModule := TPythonModule.Create(nil);
4340
gModule.Engine := gEngine;
@@ -47,7 +44,7 @@ function PyInit_DemoModule: PPyObject;
4744
gDelphiWrapper.Engine := gEngine;
4845
gDelphiWrapper.Module := gModule;
4946

50-
gEngine.LoadDll;
47+
gEngine.LoadDllInExtensionModule;
5148
Py := gDelphiWrapper.Wrap(DelphiFunctions, TObjectOwnership.soReference);
5249
gModule.SetVar('delphi_funcs', Py);
5350
gEngine.Py_DecRef(Py);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy