@@ -205,7 +205,7 @@ function PyPoint_getattr(obj : PPyObject; key : PAnsiChar) : PPyObject; cdecl;
205205 // Else check for a method
206206 Result := PyObject_GenericGetAttr(obj, PyUnicodeFromString(key));
207207 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]) )));
209209 end ;
210210 end ;
211211end ;
@@ -226,7 +226,7 @@ function PyPoint_setattrfunc(obj : PPyObject; key : PAnsiChar; value : PPyObjec
226226 Result := 0 ;
227227 end
228228 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]) )));
230230 // Check for attribute y
231231 end else if key = ' y' then begin
232232 if PyLong_Check(value ) then
@@ -235,9 +235,9 @@ function PyPoint_setattrfunc(obj : PPyObject; key : PAnsiChar; value : PPyObjec
235235 Result := 0 ;
236236 end
237237 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]) )));
239239 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]) )));
241241 end ;
242242end ;
243243
0 commit comments