From 826c1bd894280d6980aa540662b60eebf6939434 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sun, 10 Dec 2000 03:41:32 +0000 Subject: [PATCH] Correct asynchrony with python generator [SVN r8442] --- .../boost/python/detail/extension_class.hpp | 39 ++++++++++++++++--- include/boost/python/detail/init_function.hpp | 30 +++++++------- 2 files changed, 49 insertions(+), 20 deletions(-) diff --git a/include/boost/python/detail/extension_class.hpp b/include/boost/python/detail/extension_class.hpp index 0e2e3427..94d9bf6b 100644 --- a/include/boost/python/detail/extension_class.hpp +++ b/include/boost/python/detail/extension_class.hpp @@ -6,7 +6,7 @@ // The author gratefully acknowleges the support of Dragon Systems, Inc., in // producing this work. // -// This file automatically generated for 5-argument constructors by +// This file automatically generated for 10-argument constructors by // gen_extclass.python #ifndef EXTENSION_CLASS_DWA052000_H_ @@ -363,8 +363,8 @@ class extension_class ~extension_class(); // define constructors - template - inline void def(constructor) + template + inline void def(constructor) // The following incantation builds a signature1, signature2,... object. It // should _all_ get optimized away. { add_constructor( @@ -373,7 +373,12 @@ class extension_class prepend(type::id(), prepend(type::id(), prepend(type::id(), - signature0())))))); + prepend(type::id(), + prepend(type::id(), + prepend(type::id(), + prepend(type::id(), + prepend(type::id(), + signature0()))))))))))); } @@ -625,6 +630,16 @@ public: held_instance(PyObject*, A1 a1, A2 a2, A3 a3, A4 a4) : T(a1, a2, a3, a4) {} template held_instance(PyObject*, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) : T(a1, a2, a3, a4, a5) {} + template + held_instance(PyObject*, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) : T(a1, a2, a3, a4, a5, a6) {} + template + held_instance(PyObject*, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) : T(a1, a2, a3, a4, a5, a6, a7) {} + template + held_instance(PyObject*, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) : T(a1, a2, a3, a4, a5, a6, a7, a8) {} + template + held_instance(PyObject*, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) : T(a1, a2, a3, a4, a5, a6, a7, a8, a9) {} + template + held_instance(PyObject*, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, A10 a10) : T(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) {} }; // Abstract base class for all obj holders. Base for template class @@ -676,6 +691,21 @@ public: template instance_value_holder(extension_instance* p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) : m_held(p, a1, a2, a3, a4, a5) {} + template + instance_value_holder(extension_instance* p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) : + m_held(p, a1, a2, a3, a4, a5, a6) {} + template + instance_value_holder(extension_instance* p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) : + m_held(p, a1, a2, a3, a4, a5, a6, a7) {} + template + instance_value_holder(extension_instance* p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) : + m_held(p, a1, a2, a3, a4, a5, a6, a7, a8) {} + template + instance_value_holder(extension_instance* p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) : + m_held(p, a1, a2, a3, a4, a5, a6, a7, a8, a9) {} + template + instance_value_holder(extension_instance* p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, A10 a10) : + m_held(p, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) {} public: // implementation of instance_holder_base required interface bool held_by_value() { return true; } @@ -829,4 +859,3 @@ std::vector class_registry::static_derived_class_info; }}} // namespace boost::python::detail #endif // EXTENSION_CLASS_DWA052000_H_ - diff --git a/include/boost/python/detail/init_function.hpp b/include/boost/python/detail/init_function.hpp index e53f8aa9..f4b24fa6 100644 --- a/include/boost/python/detail/init_function.hpp +++ b/include/boost/python/detail/init_function.hpp @@ -110,11 +110,11 @@ template struct init2; template struct init3; template struct init4; template struct init5; -template struct Init6; -template struct Init7; -template struct Init8; -template struct Init9; -template struct Init10; +template struct init6; +template struct init7; +template struct init8; +template struct init9; +template struct init10; template struct init_function @@ -165,7 +165,7 @@ struct init_function template static init* create(signature6) { - return new Init6::const_reference, detail::parameter_traits::const_reference, detail::parameter_traits::const_reference, @@ -176,7 +176,7 @@ struct init_function template static init* create(signature7) { - return new Init7::const_reference, detail::parameter_traits::const_reference, detail::parameter_traits::const_reference, @@ -188,7 +188,7 @@ struct init_function template static init* create(signature8) { - return new Init8::const_reference, detail::parameter_traits::const_reference, detail::parameter_traits::const_reference, @@ -201,7 +201,7 @@ struct init_function template static init* create(signature9) { - return new Init9::const_reference, detail::parameter_traits::const_reference, detail::parameter_traits::const_reference, @@ -215,7 +215,7 @@ struct init_function template static init* create(signature10) { - return new Init10::const_reference, detail::parameter_traits::const_reference, detail::parameter_traits::const_reference, @@ -353,7 +353,7 @@ struct init5 : init }; template -struct Init6 : init +struct init6 : init { virtual instance_holder_base* create_holder(extension_instance* self, PyObject* args, PyObject* /*keywords*/) const { @@ -379,7 +379,7 @@ struct Init6 : init }; template -struct Init7 : init +struct init7 : init { virtual instance_holder_base* create_holder(extension_instance* self, PyObject* args, PyObject* /*keywords*/) const { @@ -407,7 +407,7 @@ struct Init7 : init }; template -struct Init8 : init +struct init8 : init { virtual instance_holder_base* create_holder(extension_instance* self, PyObject* args, PyObject* /*keywords*/) const { @@ -437,7 +437,7 @@ struct Init8 : init }; template -struct Init9 : init +struct init9 : init { virtual instance_holder_base* create_holder(extension_instance* self, PyObject* args, PyObject* /*keywords*/) const { @@ -469,7 +469,7 @@ struct Init9 : init }; template -struct Init10 : init +struct init10 : init { virtual instance_holder_base* create_holder(extension_instance* self, PyObject* args, PyObject* /*keywords*/) const {