We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d88811b commit 38b24e2Copy full SHA for 38b24e2
Source/PythonEngine.pas
@@ -5185,7 +5185,12 @@ function TPythonEngine.VariantAsPyObject( const V : Variant ) : PPyObject;
5185
varShortInt,
5186
varWord,
5187
varLongWord,
5188
- varInteger: Result := PyLong_FromLong( DeRefV );
+ {$IFDEF FPC}
5189
+ // See https://github.com/pyscripter/python4delphi/issues/334
5190
+ varInteger: Result := PyLong_FromLong(Integer(DeRefV));
5191
+ {$ELSE}
5192
+ varInteger: Result := PyLong_FromLong(DeRefV);
5193
+ {$ENDIF}
5194
varInt64: Result := PyLong_FromLongLong( DeRefV );
5195
varSingle,
5196
varDouble,
0 commit comments