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;
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
You can’t perform that action at this time.
0 commit comments