File tree Expand file tree Collapse file tree 2 files changed +0
-12
lines changed Expand file tree Collapse file tree 2 files changed +0
-12
lines changed Original file line number Diff line number Diff line change @@ -5890,12 +5890,7 @@ function TPythonEngine.VariantAsPyObject( const V : Variant ) : PPyObject;
58905890 wStr := ' '
58915891 else
58925892 wStr := DeRefV;
5893- { $IFDEF PREFER_UNICODE}
58945893 Result := PyUnicode_FromWideChar( PWideChar(wStr), Length(wStr) );
5895- { $ELSE}
5896- s := wStr;
5897- Result := PyString_FromStringAndSize(PAnsiChar(s), Length(s));
5898- { $ENDIF}
58995894 end ;
59005895 varString:
59015896 begin
@@ -5905,12 +5900,7 @@ function TPythonEngine.VariantAsPyObject( const V : Variant ) : PPyObject;
59055900 varUString:
59065901 begin
59075902 wStr := DeRefV;
5908- { $IFDEF PREFER_UNICODE}
59095903 Result := PyUnicode_FromWideChar( PWideChar(wStr), Length(wStr) );
5910- { $ELSE}
5911- s := wStr;
5912- Result := PyString_FromStringAndSize(PAnsiChar(s), Length(s));
5913- { $ENDIF}
59145904 end ;
59155905 else
59165906 if VarType(DeRefV) and varArray <> 0 then
Original file line number Diff line number Diff line change @@ -523,13 +523,11 @@ procedure TMain.btnTestStringsClick(Sender: TObject);
523523 Assert( VarIsPythonUnicode(c.GetItem(0 )) );
524524 Assert( c.GetItem(0 ) = ' Hello world!' );
525525 Assert( c.GetItem(0 ) = w );
526- { $IFDEF PREFER_UNICODE}
527526 c := w;
528527 b := VarPythonCreate(c);
529528 Assert( VarIsPythonUnicode(b) );
530529 Assert( b = c );
531530 Assert( b = w );
532- { $ENDIF}
533531 // empty strings
534532 a := VarPythonEval( ' u""' );
535533 Assert(a.length = 0 );
You can’t perform that action at this time.
0 commit comments