[C++-sig] Inserting custom code into pyplusplus output

Niall Douglas s_sourceforge at nedprod.com
Tue Jun 13 16:15:51 CEST 2006

On 13 Jun 2006 at 11:59, Roman Yakovenko wrote:

> > So can pyplusplus be extended to automatically generate this kind of
> > accessor code
> We are working on this:
> http://language-binding.net/pyplusplus/peps/call_wrapper_policies.html

You may find the code defining the macro DEFINE_MAKECARRAYITER() very 
useful in TnFOX. It allows access to dynamic arrays which can be 
modified and extended by a python list interface.

Also, you can't get pyplusplus to generate thread safe code alone. 
You need alterations to BPL because the iterator interface needs GIL 
unlocking, and nowhere does BPL pass through pyplusplus code to allow 

The patches required to BPL are moderate however and would cost 
little in runtime overhead. You basically need two installable 
function pointers to do the GIL locking and unlocking.


More information about the Cplusplus-sig mailing list