Skip to content

Commit 2305768

Browse files
author
nobody
committed
This commit was manufactured by cvs2svn to create branch 'RC_1_34_0'.
[SVN r35170]
1 parent 029618f commit 2305768

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

test/crossmod_opaque.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# -*- coding: iso-latin-1 -*-
2+
# Copyright Gottfried Ganßauge 2006.
3+
# Distributed under the Boost Software License, Version 1.0. (See
4+
# accompanying file LICENSE_1_0.txt or copy at
5+
# http://www.boost.org/LICENSE_1_0.txt)
6+
7+
if __name__ == '__main__':
8+
print "running..."
9+
10+
import crossmod_opaque_a
11+
import crossmod_opaque_b
12+
13+
crossmod_opaque_a.get()
14+
crossmod_opaque_b.get()
15+
16+
print "Done."

test/crossmod_opaque_a.cpp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright Gottfried Ganßauge 2006.
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+
# include <boost/python/return_opaque_pointer.hpp>
6+
# include <boost/python/def.hpp>
7+
# include <boost/python/module.hpp>
8+
# include <boost/python/return_value_policy.hpp>
9+
10+
typedef struct opaque_ *opaque;
11+
12+
opaque the_op = ((opaque) 0x47110815);
13+
14+
opaque get() { return the_op; }
15+
16+
BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID(opaque_)
17+
18+
namespace bpl = boost::python;
19+
20+
BOOST_PYTHON_MODULE(crossmod_opaque_a)
21+
{
22+
bpl::def (
23+
"get",
24+
&::get,
25+
bpl::return_value_policy<bpl::return_opaque_pointer>());
26+
}

test/crossmod_opaque_b.cpp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright Gottfried Ganßauge 2006.
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+
# include <boost/python/return_opaque_pointer.hpp>
6+
# include <boost/python/def.hpp>
7+
# include <boost/python/module.hpp>
8+
# include <boost/python/return_value_policy.hpp>
9+
10+
typedef struct opaque_ *opaque;
11+
12+
opaque the_op = ((opaque) 0x47110815);
13+
14+
opaque get() { return the_op; }
15+
16+
BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID(opaque_)
17+
18+
namespace bpl = boost::python;
19+
20+
BOOST_PYTHON_MODULE(crossmod_opaque_b)
21+
{
22+
bpl::def (
23+
"get",
24+
&::get,
25+
bpl::return_value_policy<bpl::return_opaque_pointer>());
26+
}

0 commit comments

Comments
 (0)