File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -1040,15 +1040,13 @@ function SimplePythonToValue(PyValue: PPyObject; TypeInfo: PTypeInfo;
10401040 Value := V.Cast(TypeInfo);
10411041 Result := True;
10421042 end ;
1043- tkInteger, tkFloat, tkInt64:
1043+ tkInteger, tkFloat, tkInt64, tkVariant :
10441044 begin
1045- V := TValue.FromVariant(GetPythonEngine.PyObjectAsVariant(PyValue));
1046- Value := V.Cast(TypeInfo);
1047- Result := True;
1048- end ;
1049- tkVariant:
1050- begin
1051- Value := TValue.From<Variant>(GetPythonEngine.PyObjectAsVariant(PyValue));
1045+ V := TValue.From<Variant>(GetPythonEngine.PyObjectAsVariant(PyValue));
1046+ if TypeInfo^.Kind = tkVariant then
1047+ Value := V
1048+ else
1049+ Value := V.Cast(TypeInfo);
10521050 Result := True;
10531051 end ;
10541052 tkEnumeration:
You can’t perform that action at this time.
0 commit comments