|
Boost Users : |
From: Jason.Sibthorpe_at_[hidden]
Date: 2003-09-05 12:49:07
I have just checked out the 'latest' version from cvs. I notice
that the 'problem' has been fixed.
Thanks
-J
-----Original Message-----
From: Jason.Sibthorpe_at_[hidden] [mailto:Jason.Sibthorpe_at_[hidden]]
Sent: 05 September 2003 17:21
To: boost-users_at_[hidden]
Subject: [Boost-users] pyste and incomplete types
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-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net