Skip to content

Commit 360e6a5

Browse files
committed
Make compatible with fpc 3.2
1 parent 45d2a3e commit 360e6a5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Source/VarPyth.pas

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1676,13 +1676,16 @@ function TPythonVariantType.EvalPython(const V: TVarData;
16761676
if not Assigned(_value) then
16771677
raise Exception.Create(SCantConvertValueToPythonObject);
16781678
if PyList_Check(AObject) then
1679-
_result := PyList_SetItem( AObject, Variant(AKey), _value )
1679+
_result := PyList_SetItem( AObject,
1680+
{$IFDEF FPC}PtrInt(Variant(AKey)){$ELSE}Variant(AKey){$ENDIF}, _value )
16801681
else if PyTuple_Check(AObject) then
1681-
_result := PyTuple_SetItem( AObject, Variant(AKey), _value )
1682+
_result := PyTuple_SetItem( AObject,
1683+
{$IFDEF FPC}PtrInt(Variant(AKey)){$ELSE}Variant(AKey){$ENDIF}, _value )
16821684
else
16831685
try
16841686
if PySequence_Check(AObject) <> 0 then
1685-
_result := PySequence_SetItem(AObject, Variant(AKey), _value)
1687+
_result := PySequence_SetItem(AObject,
1688+
{$IFDEF FPC}PtrInt(Variant(AKey)){$ELSE}Variant(AKey){$ENDIF}, _value)
16861689
else
16871690
_result := PyObject_SetItem( AObject, _key, _value );
16881691
finally

0 commit comments

Comments
 (0)