|
Boost : |
From: Jason.Sibthorpe_at_[hidden]
Date: 2003-09-05 10:58:56
Hi,
I have encountered a problem with pyste and incomplete types. From earlier
posts and the doco I think that pyste should generate
BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID(it)
But is does not currently (boost boost-1.30.2).
invoking bjam without the BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID(it)
results
in the output attached (output1)
with BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID(it) results
in the output attached (output2)
In either case It does not build. Am I misunderstanding something?
Thanks
Jason
////////////////////////////////////////////////////////////////////////////
///
//// incomplete_type.h
////////////////////////////////////////////////////////////////////////////
///
typedef struct incomplete_type it;
it *func1(void);
////////////////////////////////////////////////////////////////////////////
///
//// incomplete_type.pyste
////////////////////////////////////////////////////////////////////////////
///
itype = AllFromHeader("incomplete_type.h")
set_policy(itype.func1, return_value_policy('return_opaque_pointer'))
// Note the stringified 'return_opaque_pointer'
////////////////////////////////////////////////////////////////////////////
///
//// itype.cpp - pyste output:
////////////////////////////////////////////////////////////////////////////
///
// Includes
===================================================================
#include <boost/python.hpp>
#include <incomplete_type.h>
// Using
======================================================================
using namespace boost::python;
// Module
=====================================================================
BOOST_PYTHON_MODULE(itype)
{
def("func1", &func1, return_value_policy< return_opaque_pointer >());
class_< incomplete_type, boost::noncopyable >("incomplete_type",
no_init)
;
}
Jason Sibthorpe
Software Engineer
Aculab
Tel: +44 (0) 1908 273 869
Fax: +44 (0) 1908 273 801
Email: jason.sibthorpe_at_[hidden]
Website: <http://www.aculab.com>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk