@@ -2581,8 +2581,8 @@ TPyVar = class(TPyObject)
2581
2581
// //////////////
2582
2582
2583
2583
// Basic services
2584
- function GetAttr (key : PAnsiChar ) : PPyObject; override;
2585
- function SetAttr ( key : PAnsiChar; value : PPyObject) : Integer; override;
2584
+ function GetAttrO ( key: PPyObject ) : PPyObject; override;
2585
+ function SetAttrO ( key, value : PPyObject) : Integer; override;
2586
2586
function Repr : PPyObject; override;
2587
2587
2588
2588
// Class methods
@@ -8279,26 +8279,26 @@ destructor TPyVar.Destroy;
8279
8279
8280
8280
// Then we override the needed services
8281
8281
8282
- function TPyVar.GetAttr (key : PAnsiChar ) : PPyObject;
8282
+ function TPyVar.GetAttrO ( key: PPyObject ) : PPyObject;
8283
8283
begin
8284
8284
with GetPythonEngine do
8285
8285
begin
8286
- if CompareText( AnsiString (key), ' Value' ) = 0 then
8286
+ if CompareText( PyObjectAsString (key), ' Value' ) = 0 then
8287
8287
Result := GetValue
8288
8288
else
8289
- Result := inherited GetAttr (key);
8289
+ Result := inherited GetAttrO (key);
8290
8290
end ;
8291
8291
end ;
8292
8292
8293
- function TPyVar.SetAttr ( key : PAnsiChar; value : PPyObject) : Integer;
8293
+ function TPyVar.SetAttrO ( key, value : PPyObject) : Integer;
8294
8294
begin
8295
8295
Result := 0 ;
8296
8296
with GetPythonEngine do
8297
8297
begin
8298
- if CompareText( AnsiString (key), ' Value' ) = 0 then
8298
+ if CompareText( PyObjectAsString (key), ' Value' ) = 0 then
8299
8299
SetValue( value )
8300
8300
else
8301
- Result := inherited SetAttr (key, value );
8301
+ Result := inherited SetAttrO (key, value );
8302
8302
end ;
8303
8303
end ;
8304
8304
0 commit comments