File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1676,13 +1676,16 @@ function TPythonVariantType.EvalPython(const V: TVarData;
1676
1676
if not Assigned(_value) then
1677
1677
raise Exception.Create(SCantConvertValueToPythonObject);
1678
1678
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 )
1680
1681
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 )
1682
1684
else
1683
1685
try
1684
1686
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)
1686
1689
else
1687
1690
_result := PyObject_SetItem( AObject, _key, _value );
1688
1691
finally
You can’t perform that action at this time.
0 commit comments