Skip to content

Commit e85e138

Browse files
committed
refac last diffs
1 parent c45c546 commit e85e138

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

python4lazarus/PythonEngine.pas

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3011,12 +3011,9 @@ procedure TDynamicDll.DoOpenDll(const aDllName : String);
30113011
{$ifdef windows}
30123012
FDLLHandle := Windows.LoadLibrary(PChar(S));
30133013
{$else}
3014-
//Linux: need here RTLD_GLOBAL, so Python can do "import ctypes"
3015-
{$ifdef haiku}
3016-
FDLLHandle := PtrInt(dlopen(PAnsiChar(S), RTLD_NOW+RTLD_GLOBAL));
3017-
{$else}
3018-
FDLLHandle := PtrInt(dlopen(PAnsiChar(S), RTLD_LAZY+RTLD_GLOBAL));
3019-
{$endif}
3014+
//Linux: need here RTLD_GLOBAL, so Python can do "import ctypes"
3015+
//Haiku: without RTLD_NOW it doesn't seem to detect the library or plugins without running with "LD_PRELOAD ..."
3016+
FDLLHandle := PtrInt(dlopen(PAnsiChar(S), {$ifdef haiku}RTLD_NOW{$else}RTLD_LAZY{$endif}+RTLD_GLOBAL));
30203017
{$endif}
30213018
end;
30223019
end;

0 commit comments

Comments
 (0)