2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-30 20:12:37 +00:00

update to defaults gen that fixes member functions with zero arguments (added a test in defaults.cpp)

[SVN r15162]
This commit is contained in:
Joel de Guzman
2002-09-04 22:36:05 +00:00
parent d274a8395b
commit 4d53fb97b6
2 changed files with 10 additions and 1 deletions

View File

@@ -83,6 +83,13 @@ struct X {
return format % make_tuple(a, b, c, d);
}
object
bar2(int a = 0, char b = 'D', std::string c = "default", double d = 0.0) const
{
// tests zero arg member function
return format % make_tuple(a, b, c, d);
}
object
foo(int a, bool b=false) const
{
@@ -111,6 +118,7 @@ struct X {
};
BOOST_PYTHON_MEM_FUN_GENERATOR(X_bar_stubs, bar, 1, 4)
BOOST_PYTHON_MEM_FUN_GENERATOR(X_bar2_stubs, bar2, 0, 4) // tests zero arg member function
BOOST_PYTHON_MEM_FUN_GENERATOR(X_foo_2_stubs, foo, 1, 2)
BOOST_PYTHON_MEM_FUN_GENERATOR(X_foo_3_stubs, foo, 2, 3)