* * *

Author Topic: Python4Delphi - Error with the function Py_XIncRef  (Read 424 times)

Felfra

  • Newbie
  • Posts: 4
Python4Delphi - Error with the function Py_XIncRef
« on: November 08, 2018, 12:04:05 am »
Hello All
I have an error "unit1.pas(79,3) Error: Identifier not found "Py_XIncRef"
in th body of a function :
procedure TForm1.PythonDelphiVar2ExtGetData(Sender: TObject; var Data: PPyObject
  );
begin
  Data := FMyPythonObject;
  Py_XIncRef(Data);
end;
I have the last versions of Lazarus and Python4Delphi, installed with p4dlaz.lpk. OS: Win10 x64
What can I do ? Anybody has an idea ?
Thank you for your help.

Felfra

  • Newbie
  • Posts: 4
Re: Python4Delphi - Error with the function Py_XIncRef
« Reply #1 on: November 08, 2018, 12:12:37 am »
I add that this code is part of th exercise number 4 of the python4delphi tutorial.
Py_XIncRef is not a personal function...

Felfra

  • Newbie
  • Posts: 4
Re: Python4Delphi - Error with the function Py_XIncRef
« Reply #2 on: November 08, 2018, 12:27:16 pm »
And i have not found this identifier, Py_XIncRef, in any library or other file of the distribution Python4Delphi, except in PythonEngine.hpp, only a reference

Alextp

  • Hero Member
  • *****
  • Posts: 705
    • UVviewsoft
Re: Python4Delphi - Error with the function Py_XIncRef
« Reply #3 on: November 08, 2018, 01:36:26 pm »
with GetPythonEngine do
  Py****;

Felfra

  • Newbie
  • Posts: 4
Re: Python4Delphi - Error with the function Py_XIncRef
« Reply #4 on: November 08, 2018, 01:54:47 pm »
Oh, what an entertainment ! I looked for hours !
Thank you very much, Alextp  :D

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus