Last change
on this file since 29 was
29,
checked in by landauf, 16 years ago
|
updated boost from 1_33_1 to 1_34_1
|
File size:
561 bytes
|
Line | |
---|
1 | // Copyright David Abrahams 2002. |
---|
2 | // Distributed under the Boost Software License, Version 1.0. (See |
---|
3 | // accompanying file LICENSE_1_0.txt or copy at |
---|
4 | // http://www.boost.org/LICENSE_1_0.txt) |
---|
5 | |
---|
6 | #include <boost/python/cast.hpp> |
---|
7 | #include <boost/detail/lightweight_test.hpp> |
---|
8 | |
---|
9 | struct X { long x; }; |
---|
10 | struct Y : X, PyObject {}; |
---|
11 | |
---|
12 | int main() |
---|
13 | { |
---|
14 | PyTypeObject o; |
---|
15 | Y y; |
---|
16 | BOOST_TEST(&boost::python::upcast<PyObject>(&o)->ob_refcnt == &o.ob_refcnt); |
---|
17 | BOOST_TEST(&boost::python::upcast<PyObject>(&y)->ob_refcnt == &y.ob_refcnt); |
---|
18 | return boost::report_errors(); |
---|
19 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.