steps to reproduce:
after code below
...
var
S: String;
Engine: TPythonEngine;
PObj: PPyObject;
...
S := 'ABC'#0'D';
PObj := Engine.VariantAsPyObject(S)
we have 'ABC'in PObj
Below bug fix:
in TPythonEngine.VariantAsPyObject
replace all occurrence of
Result := PyString_FromString( PAnsiChar(s) )
to
Result := PyString_FromStringAndSize(PAnsiChar(s), Length(s))
Original issue reported on code.google.com by kovalyov...@gmail.com on 30 Jul 2012 at 1:20
Original issue reported on code.google.com by
kovalyov...@gmail.com
on 30 Jul 2012 at 1:20