Pass pointer from C++ class to Boost Python script ?!!!

  • Thread starter Mavuram, Vishnu (IT)
  • Start date
M

Mavuram, Vishnu (IT)

Hi,
Did you get an answer to this posting of yours?

What I am trying to do is:

struct Sec
{
....
};

int main(int, char **)
{
Py_Initialize();
...

Sec *s1 = new Sec();
PyObject *args = Py_BuildValue("(O)", s1); //*** this is where I am
having problem

...
PyObject* res = PyEval_CallObject( func, args);
...
Py_Finalize();
return 0;
}

Can you please tell me how to get convert my pointer to a valid
PyObject*?

Thanks,
Vishnu Mavuram
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top