Skip to content

Commit 1884603

Browse files
committed
Fix SetProgramArgs for MacOS
1 parent d4ae7ac commit 1884603

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

PythonForDelphi/Components/Sources/Core/Definition.Inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@
180180
{$DEFINE MACOS32}
181181
{$ENDIF CPU32}
182182
{$ENDIF DARWIN}
183+
{$IFDEF UNIX}
184+
{$DEFINE POSIX}
185+
{$ENDIF UNIX}
183186
{$ENDIF FPC}
184187

185188
{$IFDEF DELPHIXE_OR_HIGHER}

PythonForDelphi/Components/Sources/Core/PythonEngine.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5024,7 +5024,7 @@ procedure TPythonEngine.SetProgramArgs;
50245024
L : array of AnsiString;
50255025
wargv : PPWideChar;
50265026
wbuff : PWideChar;
5027-
{$IFDEF LINUX}
5027+
{$IFDEF POSIX}
50285028
UCS4L : array of UCS4String;
50295029
{$ELSE}
50305030
WL : array of UnicodeString;
@@ -5054,7 +5054,7 @@ procedure TPythonEngine.SetProgramArgs;
50545054
try
50555055
wargv := PPWideChar(wbuff);
50565056
// build the PWideChar array
5057-
{$IFDEF LINUX}
5057+
{$IFDEF POSIX}
50585058
// Note that Linux uses UCS4 strings, whereas it declares using UCS2 strings!!!
50595059
SetLength(UCS4L, argc+1);
50605060
for i := 0 to argc do begin

0 commit comments

Comments
 (0)