FPC 3.3.1-r43022 [2019/09/16] for Linux x64. This code crashes, because fpc sees 'x', 'y' wrong:

  Py_BuildValue('{sLsisisisisisisOsOsOsisisisisisO}',
    'tag',
    Mark.Tag,
    'x',
    Mark.PosX,
    'y',
    Mark.PosY,
    'len',
    Mark.LenX,

I must change it to this, it works ok:
  Py_BuildValue('{sLsisisisisisisOsOsOsisisisisisO}',
    'tag',
    Mark.Tag,
    PChar(string('x')),
    Mark.PosX,
    PChar(string('y')),
    Mark.PosY,
    'len',
    Mark.LenX,

Py_BuildValue is from Python-for-Lazarus package.
    Py_BuildValue:      function( format: PAnsiChar {;...}): PPyObject; cdecl varargs;

--
Regards,
Alexey

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to