Boost logo

Boost :

From: Achim Domma (achim.domma_at_[hidden])
Date: 2001-08-23 06:25:25


is there a possibility to convert instances of objects, which are registert
in my module, to PyObjects*. The following works fine :

MyObjectA MyObjectB::mem_function(params) {
        MyObjectA retVal;
        return retVal;

but this way I can't return 'None'. So I tried the following:

PyObject* MyObjectB::mem_function(params) {
        MyObjectA retVal;
        if (ok)
                return retVal; // <- how to convert ???
                return boost::details::none();

How can I get a PyObject out of my C++ Instance ? The same problem arrises
if I try to fill a python list with my own objects.

I tried to find a solution in the sources and via but
could not find anything. If there is a solution I would be absolutly happy
with as point I can start searching.


Boost list run by bdawes at, gregod at, cpdaniel at, john at