mirror of
https://github.com/boostorg/python.git
synced 2026-01-23 05:42:30 +00:00
add a readable functor map that calls a given functor or function upon lookup. Ideas from: http://comments.gmane.org/gmane.comp.lib.boost.user/54397 and: http://comments.gmane.org/gmane.comp.lib.boost.user/73358 [SVN r77438]
12 lines
304 B
C++
12 lines
304 B
C++
// Copyright David Abrahams 2002.
|
|
// Distributed under the Boost Software License, Version 1.0. (See
|
|
// accompanying file LICENSE_1_0.txt or copy at
|
|
// http://www.boost.org/LICENSE_1_0.txt)
|
|
#include <boost/python/object.hpp>
|
|
|
|
int f(boost::python::object const& x)
|
|
{
|
|
x._("hello") = 1;
|
|
return 0;
|
|
}
|