mirror of
https://github.com/boostorg/python.git
synced 2026-01-21 17:12:22 +00:00
Regression test for a reference-counting bug thanks to Mark Evans (<mark.evans@clarisay.com>)
[SVN r8090]
This commit is contained in:
@@ -530,6 +530,13 @@ struct Fubar {
|
||||
Fubar(int) {}
|
||||
};
|
||||
|
||||
/************************************************************/
|
||||
/* */
|
||||
/* This test from Mark Evans */
|
||||
/* */
|
||||
/************************************************************/
|
||||
double sizelist(py::List list) { return list.size(); }
|
||||
|
||||
/************************************************************/
|
||||
/* */
|
||||
/* init the module */
|
||||
@@ -538,6 +545,8 @@ struct Fubar {
|
||||
|
||||
void init_module(py::Module& m)
|
||||
{
|
||||
m.def(sizelist, "sizelist");
|
||||
|
||||
py::ClassWrapper<Fubar> fubar(m, "Fubar");
|
||||
fubar.def(py::Constructor<Foo&>());
|
||||
fubar.def(py::Constructor<int>());
|
||||
|
||||
Reference in New Issue
Block a user