mirror of
https://github.com/boostorg/python.git
synced 2026-01-22 05:22:45 +00:00
Bug fix, thanks to Nicolas LELONG, nlelong-at-mgdesign.org for the report.
[SVN r20401]
This commit is contained in:
@@ -6,9 +6,19 @@
|
||||
#include <boost/python/module.hpp>
|
||||
#include <boost/python/def.hpp>
|
||||
#include <boost/python/object.hpp>
|
||||
#include <boost/python/class.hpp>
|
||||
|
||||
using namespace boost::python;
|
||||
|
||||
class NotCopyable
|
||||
{
|
||||
} not_copyable;
|
||||
|
||||
object ref_to_noncopyable()
|
||||
{
|
||||
return object(boost::ref(not_copyable));
|
||||
}
|
||||
|
||||
object call_object_3(object f)
|
||||
{
|
||||
return f(3);
|
||||
@@ -281,6 +291,9 @@ bool check_inplace(object l, object o)
|
||||
|
||||
BOOST_PYTHON_MODULE(object_ext)
|
||||
{
|
||||
class_<NotCopyable, boost::noncopyable>("NotCopyable", no_init);
|
||||
|
||||
def("ref_to_noncopyable", ref_to_noncopyable);
|
||||
def("call_object_3", call_object_3);
|
||||
def("message", message);
|
||||
def("number", number);
|
||||
|
||||
Reference in New Issue
Block a user