@@ -205,7 +205,7 @@ function PyPoint_getattr(obj : PPyObject; key : PAnsiChar) : PPyObject; cdecl;
205
205
// Else check for a method
206
206
Result := PyObject_GenericGetAttr(obj, PyUnicodeFromString(key));
207
207
if not Assigned(Result) then
208
- PyErr_SetString (PyExc_AttributeError^, PAnsiChar(Format(' Unknown attribute "%s"' ,[key])));
208
+ PyErr_SetString (PyExc_AttributeError^, PAnsiChar(AnsiString( Format(' Unknown attribute "%s"' ,[key]) )));
209
209
end ;
210
210
end ;
211
211
end ;
@@ -226,7 +226,7 @@ function PyPoint_setattrfunc(obj : PPyObject; key : PAnsiChar; value : PPyObjec
226
226
Result := 0 ;
227
227
end
228
228
else
229
- PyErr_SetString (PyExc_AttributeError^, PAnsiChar(Format(' Attribute "%s" needs an integer' ,[key])));
229
+ PyErr_SetString (PyExc_AttributeError^, PAnsiChar(AnsiString( Format(' Attribute "%s" needs an integer' ,[key]) )));
230
230
// Check for attribute y
231
231
end else if key = ' y' then begin
232
232
if PyLong_Check(value ) then
@@ -235,9 +235,9 @@ function PyPoint_setattrfunc(obj : PPyObject; key : PAnsiChar; value : PPyObjec
235
235
Result := 0 ;
236
236
end
237
237
else
238
- PyErr_SetString (PyExc_AttributeError^, PAnsiChar(Format(' Attribute "%s" needs an integer' ,[key])));
238
+ PyErr_SetString (PyExc_AttributeError^, PAnsiChar(AnsiString( Format(' Attribute "%s" needs an integer' ,[key]) )));
239
239
end else
240
- PyErr_SetString (PyExc_AttributeError^, PAnsiChar(Format(' Unknown attribute "%s"' ,[key])));
240
+ PyErr_SetString (PyExc_AttributeError^, PAnsiChar(AnsiString( Format(' Unknown attribute "%s"' ,[key]) )));
241
241
end ;
242
242
end ;
243
243
0 commit comments