Skip to content

Commit d71cfd4

Browse files
author
pyscripter
committed
FPC compatibility
1 parent 61e7164 commit d71cfd4

File tree

4 files changed

+6
-13
lines changed

4 files changed

+6
-13
lines changed

PythonForDelphi/Components/Sources/Core/Definition.Inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@
284284
{$IFDEF CPU64}
285285
{$DEFINE CPUX64}
286286
{$ENDIF CPU64}
287-
{$IF DEFINED(FPC_VER) and (FPC_VER > 5)}
287+
{$IF DEFINED(FPC_VER) and (FPC_VER >= 5)}
288288
{$DEFINE USESYSTEMDISPINVOKE}
289289
{$IFEND}
290290
{$ENDIF FPC}

PythonForDelphi/Components/Sources/Core/VarPyth.pas

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,10 +1058,6 @@ TStringDesc = record
10581058
end
10591059
else
10601060
begin
1061-
{$IFDEF FPC}
1062-
{$HINT CVarTypeToElementInfo not yet implemented}
1063-
RaiseDispError;
1064-
{$ELSE}
10651061
LArguments[I].VType := LArgType;
10661062
case CVarTypeToElementInfo[LArgType].Size of
10671063
1, 2, 4:
@@ -1077,7 +1073,6 @@ TStringDesc = record
10771073
else
10781074
RaiseDispError;
10791075
end;
1080-
{$ENDIF}
10811076
end;
10821077
Inc(NativeInt(LParamPtr), SizeOf(Pointer));
10831078
end;

PythonForDelphi/Components/p4dlaz.lpk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
<Name Value="P4DLaz"/>
66
<AddToProjectUsesSection Value="True"/>
77
<CompilerOptions>
8-
<Version Value="10"/>
8+
<Version Value="11"/>
99
<PathDelim Value="\"/>
1010
<SearchPaths>
11-
<OtherUnitFiles Value="$(PackageDir);$(PackageDir)\Sources\Core"/>
11+
<OtherUnitFiles Value="Sources\Core"/>
1212
</SearchPaths>
1313
<Parsing>
1414
<SyntaxOptions>
@@ -51,7 +51,7 @@
5151
</Item2>
5252
</RequiredPkgs>
5353
<UsageOptions>
54-
<UnitPath Value="$(PackageDir);$(PackageDir)\Sources\Core"/>
54+
<UnitPath Value="$(PkgDir);$(PkgDir)\Sources\Core"/>
5555
</UsageOptions>
5656
<PublishOptions>
5757
<Version Value="2"/>

PythonForDelphi/Components/p4dlaz.pas

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,14 @@
77
interface
88

99
uses
10-
PythonEngine, PythonGUIInputOutput, PythonAction, MethodCallBack, VarPyth,
11-
LazarusPackageIntf;
10+
PythonEngine, PythonGUIInputOutput, MethodCallBack, LazarusPackageIntf;
1211

1312
implementation
14-
13+
{$R Sources\Core\PythonEngine.dcr}
1514
procedure Register;
1615
begin
1716
RegisterUnit('PythonEngine', @PythonEngine.Register);
1817
RegisterUnit('PythonGUIInputOutput', @PythonGUIInputOutput.Register);
19-
RegisterUnit('PythonAction', @PythonAction.Register);
2018
end;
2119

2220
initialization

0 commit comments

Comments
 (0)