Skip to content

Commit

Permalink
revert DoOpenDll for Linux, change only for Haiku
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-T committed Sep 6, 2023
1 parent 60146c7 commit c45c546
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions python4lazarus/PythonEngine.pas
Original file line number Diff line number Diff line change
Expand Up @@ -3011,8 +3011,12 @@ procedure TDynamicDll.DoOpenDll(const aDllName : String);
{$ifdef windows}
FDLLHandle := Windows.LoadLibrary(PChar(S));
{$else}
//Linux: need here RTLD_GLOBAL, so Python can do "import ctypes"
FDLLHandle := PtrInt(dlopen(PAnsiChar(S), RTLD_NOW+RTLD_GLOBAL));
//Linux: need here RTLD_GLOBAL, so Python can do "import ctypes"
{$ifdef haiku}
FDLLHandle := PtrInt(dlopen(PAnsiChar(S), RTLD_NOW+RTLD_GLOBAL));
{$else}
FDLLHandle := PtrInt(dlopen(PAnsiChar(S), RTLD_LAZY+RTLD_GLOBAL));
{$endif}
{$endif}
end;
end;
Expand Down

0 comments on commit c45c546

Please sign in to comment.