mirror of
https://github.com/boostorg/python.git
synced 2026-01-25 18:32:24 +00:00
Yet another bug reported by Peter Bienstman is now fixed.
[SVN r13370]
This commit is contained in:
@@ -53,6 +53,7 @@ rule bpl-test ( name ? : files * )
|
||||
|
||||
bpl-test bienstman1 ;
|
||||
bpl-test bienstman2 ;
|
||||
bpl-test bienstman3 ;
|
||||
bpl-test try : newtest.py m1.cpp m2.cpp ;
|
||||
bpl-test builtin_converters : test_builtin_converters.py test_builtin_converters.cpp ;
|
||||
bpl-test test_pointer_adoption ;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
'''
|
||||
>>> import bienstman1_ext
|
||||
>>> from bienstman1_ext import *
|
||||
>>> # from Numeric import *
|
||||
'''
|
||||
def run(args = None):
|
||||
import sys
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'''
|
||||
>>> import bienstman1_ext.py
|
||||
>>> import bienstman2_ext
|
||||
'''
|
||||
def run(args = None):
|
||||
import sys
|
||||
|
||||
33
test/bienstman3.cpp
Normal file
33
test/bienstman3.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#include <boost/python/module.hpp>
|
||||
#include <boost/python/class.hpp>
|
||||
#include <boost/mpl/type_list.hpp>
|
||||
|
||||
struct V
|
||||
{
|
||||
virtual void f() = 0;
|
||||
};
|
||||
|
||||
struct B
|
||||
{
|
||||
B(const V&) {}
|
||||
};
|
||||
|
||||
BOOST_PYTHON_MODULE_INIT(bienstman3_ext)
|
||||
{
|
||||
using namespace boost::python;
|
||||
using boost::mpl::type_list;
|
||||
|
||||
module m("bienstman3_ext");
|
||||
|
||||
m
|
||||
|
||||
.add(
|
||||
class_<V, boost::noncopyable>("V")
|
||||
)
|
||||
|
||||
.add(
|
||||
class_<B>("B")
|
||||
.def_init(type_list<const V&>())
|
||||
)
|
||||
;
|
||||
}
|
||||
15
test/bienstman3.py
Normal file
15
test/bienstman3.py
Normal file
@@ -0,0 +1,15 @@
|
||||
'''
|
||||
>>> from bienstman3_ext import *
|
||||
'''
|
||||
def run(args = None):
|
||||
import sys
|
||||
import doctest
|
||||
|
||||
if args is not None:
|
||||
sys.argv = args
|
||||
return doctest.testmod(sys.modules.get(__name__))
|
||||
|
||||
if __name__ == '__main__':
|
||||
print "running..."
|
||||
import sys
|
||||
sys.exit(run()[0])
|
||||
Reference in New Issue
Block a user