[C++-sig] Some fixes on Pyste and a few questions

jonathan liger jonathan.liger at wanadoo.fr
Fri Jan 6 16:35:40 CET 2006


Hi,

I attached to this mail a patch for Pyste 0.9.10 (in fact, the version 
which is distributed with boost 1.33.1). This patch fixes the following 
problems I encountered:
- const pointers were interpreted as pointer on const data
- "return_value_polic(ies)" are not handled properly with --no-using 
(because policies are declared in boost::python and the namespace is not 
prepended)
- Methods with default arguments are wrapped using function which are 
inside the namespace of every pyste object. They are prefixed whith the 
name of class in which the method is declared, not the one we are 
currently wrapping. Added the name of the class we are currently 
wrapping in the mangled overloaded name

As this patch surely does not do things the cleanest way, I would like 
to contact the maintener of Pyste and see what should be done. Is it 
still Bruno da Silva de Oliveira (nicodemus at globalite.com.br), as 
written in the sources of Pyste ?

I also have a few question on Pyste
- what does 'return_opaque_pointer' policies suits for ? It does not 
work (it generates invalid code) with functions returning void*, which 
is the C way to return opaque structures.
- I use Pyste in "multiple mode" and I want to be sure of the order in 
which export functions are called in the _main.cpp file. I tried using 
the "Import" directive but this one seems to be buggy:
    Exple:
        I want to have

BOOST_PYTHON_MODULE(myModule)
{
    Export_foo();
    Export_bar1();
    Export_bar2();
}

        in _main.cpp because some classes in bar1 and bar2 inherits from 
classes in foo. Importing foo.pyste at the begining of bar1 and bar2 
solves that problems but causes wrapping code in _foo.cpp to be 
generated 3 times !
Am I using this wrong or should there be another directive to manage the 
order of the Export_* functions ?

_john.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pyste.diff
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20060106/3bb25945/attachment.txt>


More information about the Cplusplus-sig mailing list