mirror of
https://github.com/boostorg/python.git
synced 2026-01-24 18:12:43 +00:00
https://svn.boost.org/svn/boost/trunk ........ r41613 | hkaiser | 2007-12-02 16:34:52 -0800 (Sun, 02 Dec 2007) | 1 line Wave: One more fix to enable standalone header compilation. ........ r41621 | hkaiser | 2007-12-02 17:16:28 -0800 (Sun, 02 Dec 2007) | 1 line Wave: Updated documentation. ........ r41625 | noel_belcourt | 2007-12-02 18:04:30 -0800 (Sun, 02 Dec 2007) | 4 lines Change macro logic to get <stdarg.h> included on SunOS. ........ r41626 | grafik | 2007-12-02 18:57:49 -0800 (Sun, 02 Dec 2007) | 1 line Work around some Windows CMD.EXE programs that will fail executing a totally empty batch file. ........ r41627 | grafik | 2007-12-02 19:06:22 -0800 (Sun, 02 Dec 2007) | 1 line Work around some Windows CMD.EXE programs that will fail executing a totally empty batch file. ........ r41629 | grafik | 2007-12-02 20:05:39 -0800 (Sun, 02 Dec 2007) | 1 line Bump bjam to 3.1.17 after 3.1.16 release. ........ r41636 | nesotto | 2007-12-03 01:00:23 -0800 (Mon, 03 Dec 2007) | 1 line missing include ........ r41638 | nesotto | 2007-12-03 01:08:02 -0800 (Mon, 03 Dec 2007) | 1 line Ticket #1477 ........ r41639 | vladimir_prus | 2007-12-03 02:39:46 -0800 (Mon, 03 Dec 2007) | 2 lines Fix 64-bit windows msvc detection, again. ........ r41642 | t_schwinger | 2007-12-03 05:25:26 -0800 (Mon, 03 Dec 2007) | 3 lines Strips top-level cv-qualifiers off non-reference types, now. ........ r41644 | nesotto | 2007-12-03 07:16:16 -0800 (Mon, 03 Dec 2007) | 1 line Ticket #1488 ........ r41645 | nesotto | 2007-12-03 07:19:37 -0800 (Mon, 03 Dec 2007) | 1 line Ticket #1467 ........ r41646 | grafik | 2007-12-03 07:48:40 -0800 (Mon, 03 Dec 2007) | 1 line Switch testing to 3.1.16 bjam release. ........ r41647 | niels_dekker | 2007-12-03 10:14:37 -0800 (Mon, 03 Dec 2007) | 1 line Added value_init test for C style array of bytes ........ r41648 | niels_dekker | 2007-12-03 10:20:19 -0800 (Mon, 03 Dec 2007) | 1 line Added missing #include to value_init_test.cpp. (My mistake!) ........ r41649 | jhunold | 2007-12-03 10:47:17 -0800 (Mon, 03 Dec 2007) | 2 lines Silence unused paramter warning in release mode. ........ r41650 | jhunold | 2007-12-03 10:51:26 -0800 (Mon, 03 Dec 2007) | 2 lines Add cosmetic virtual detructors to silence compile warnings. ........ r41651 | t_schwinger | 2007-12-03 11:00:09 -0800 (Mon, 03 Dec 2007) | 3 lines adds explicit failures markup for function_types ........ r41653 | lbourdev | 2007-12-03 11:13:15 -0800 (Mon, 03 Dec 2007) | 3 lines GIL: Typo in documentation. ........ r41663 | noel_belcourt | 2007-12-03 12:50:58 -0800 (Mon, 03 Dec 2007) | 5 lines Changes to support pgi-7.0 on Linux. * pthread requires rt * force IEEE 754 math for slow, but correct, numerics ........ r41667 | niels_dekker | 2007-12-03 13:41:59 -0800 (Mon, 03 Dec 2007) | 2 lines Added value_init test for an value_initialized<T> object allocated on the heap. ........ r41668 | anthonyw | 2007-12-03 14:00:26 -0800 (Mon, 03 Dec 2007) | 1 line check predicate before returning if we time out on a predicated version of timed_wait ........ [SVN r41678]
41 lines
1.0 KiB
C++
41 lines
1.0 KiB
C++
// Copyright David Abrahams 2004. Distributed under the Boost
|
|
// Software License, Version 1.0. (See accompanying
|
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
#include <boost/python/module.hpp>
|
|
#include <boost/python/def.hpp>
|
|
#include <boost/python/class.hpp>
|
|
#include <boost/python/reference_existing_object.hpp>
|
|
#include <boost/python/return_value_policy.hpp>
|
|
|
|
struct A {};
|
|
|
|
struct V
|
|
{
|
|
virtual ~V() {}; // silence compiler warningsa
|
|
virtual void f() = 0;
|
|
|
|
const A* inside() {return &a;}
|
|
|
|
A a;
|
|
};
|
|
|
|
const A* outside(const V& v) {return &v.a;}
|
|
|
|
BOOST_PYTHON_MODULE(bienstman1_ext)
|
|
{
|
|
using namespace boost::python;
|
|
using boost::shared_ptr;
|
|
using boost::python::return_value_policy;
|
|
using boost::python::reference_existing_object;
|
|
|
|
class_<A>("A");
|
|
|
|
class_<V, boost::noncopyable>("V", no_init)
|
|
.def("inside", &V::inside,
|
|
return_value_policy<reference_existing_object>())
|
|
.def("outside", outside,
|
|
return_value_policy<reference_existing_object>())
|
|
;
|
|
}
|
|
|