From 7cf495874d3dc6dd3714d0b39f56524a98b4bd84 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Tue, 31 Oct 2000 23:47:28 +0000 Subject: [PATCH] Regression test for a reference-counting bug thanks to Mark Evans () [SVN r8090] --- extclass_demo.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/extclass_demo.cpp b/extclass_demo.cpp index 42c06922..0c281452 100644 --- a/extclass_demo.cpp +++ b/extclass_demo.cpp @@ -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(m, "Fubar"); fubar.def(py::Constructor()); fubar.def(py::Constructor());