Yes, that worked. I "protected" the variable which I did not want to
get freed. I incremented reference for that variable & it started
working.
Thanks for all your guidance.
On May 3, 5:23 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> Python will do nothing with the pointer inside a PyCObj
En Fri, 02 May 2008 00:26:38 -0300, grbgooglefan <[EMAIL PROTECTED]>
escribió:
On Apr 22, 7:54 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
If you have a C function that receives a PyCObject, just include the
relevant headers (cobject.h) and you can retrieve the original pointer
us
On Apr 22, 7:54 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
>
> If you have a C function that receives a PyCObject, just include the
> relevant headers (cobject.h) and you can retrieve the original pointer
> using PyCObject_AsVoidPtr:
>
> void foo(PyObject *pyobj)
> {
> TOriginalType
En Mon, 21 Apr 2008 11:19:24 -0300, Diez B. Roggisch <[EMAIL PROTECTED]>
escribió:
Gabriel Genellina wrote:
You can't pass any arbitrary C object to a Python function.
In this case you can use a PyCObject, a Python box around a void*
pointer.
See http://docs.python.org/api/cObjects.html
Ne
En Mon, 21 Apr 2008 19:11:31 -0300, grbgooglefan <[EMAIL PROTECTED]>
escribió:
On Apr 21, 10:17 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
En Mon, 21 Apr 2008 10:24:15 -0300, grbgooglefan
<[EMAIL PROTECTED]> escribió:
> I am trying to pass a C++ object to Python function. This Python
On Apr 21, 10:17 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Mon, 21 Apr 2008 10:24:15 -0300, grbgooglefan <[EMAIL PROTECTED]> escribió:
>
> > I am trying to pass a C++ object to Python function. This Python
> > function then calls another C++ function which then uses this C++
> > objec
Gabriel Genellina wrote:
> En Mon, 21 Apr 2008 10:24:15 -0300, grbgooglefan <[EMAIL PROTECTED]>
> escribió:
>
>> I am trying to pass a C++ object to Python function. This Python
>> function then calls another C++ function which then uses this C++
>> object to call methods of that object's class.
En Mon, 21 Apr 2008 10:24:15 -0300, grbgooglefan <[EMAIL PROTECTED]> escribió:
> I am trying to pass a C++ object to Python function. This Python
> function then calls another C++ function which then uses this C++
> object to call methods of that object's class.
>
> I tried something like this, bu
grbgooglefan wrote:
> I am trying to pass a C++ object to Python function. This Python
> function then calls another C++ function which then uses this C++
> object to call methods of that object's class.
You might consider using a C++-wrapper like SIP, Swig or Boost::Python to do
this.
If you do
I am trying to pass a C++ object to Python function. This Python
function then calls another C++ function which then uses this C++
object to call methods of that object's class.
I tried something like this, but it did not work, gave core dump.
class myclass {
public:
myclass(){};
10 matches
Mail list logo