2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-25 18:32:24 +00:00

* Generalized use of force_instantiate()

* Proper handling for numeric conversion overflows
* Moved internal converter names out of the way to prepare for user conversions
* Added comments
* Fixed a bug where None could be converted to the NULL target of a member function call, causing a crash.
* Wiped out and restarted todo.txt
* long long support
* Added more regression tests and checks for current limitations


[SVN r14094]
This commit is contained in:
Dave Abrahams
2002-06-06 20:24:39 +00:00
parent e2b4178f42
commit ac2746f680
36 changed files with 2899 additions and 2396 deletions

View File

@@ -17,6 +17,7 @@
# include <boost/python/pointee.hpp>
# include <boost/python/detail/preprocessor.hpp>
# include <boost/preprocessor/enum_params.hpp>
# include <boost/python/detail/force_instantiate.hpp>
namespace boost { namespace python { namespace objects {
@@ -66,19 +67,19 @@ struct pointer_holder_back_reference : instance_holder
# include <boost/python/preprocessed/ptr_holder_back_reference.hpp>
# endif
# define BOOST_PYTHON_CONSTRUCT_POINTER_HOLDER_BACK_REFERENCE(nargs, ignored) \
BOOST_PP_EXPR_IF(nargs, template <) \
BOOST_PP_ENUM_PARAMS(nargs, class A) \
BOOST_PP_EXPR_IF(nargs, >) \
pointer_holder_back_reference(PyObject* p \
BOOST_PP_COMMA_IF(nargs) \
BOOST_PYTHON_ENUM_PARAMS2(nargs, (A,a))) \
: m_p(new held_type( \
p BOOST_PP_COMMA_IF(nargs) \
BOOST_PP_ENUM(nargs, BOOST_PYTHON_UNFORWARD, nil) \
)) \
{ \
void const* x = &instance_finder<held_type>::registration; (void)x; \
# define BOOST_PYTHON_CONSTRUCT_POINTER_HOLDER_BACK_REFERENCE(nargs, ignored) \
BOOST_PP_EXPR_IF(nargs, template <) \
BOOST_PP_ENUM_PARAMS(nargs, class A) \
BOOST_PP_EXPR_IF(nargs, >) \
pointer_holder_back_reference(PyObject* p \
BOOST_PP_COMMA_IF(nargs) \
BOOST_PYTHON_ENUM_PARAMS2(nargs, (A,a))) \
: m_p(new held_type( \
p BOOST_PP_COMMA_IF(nargs) \
BOOST_PP_ENUM(nargs, BOOST_PYTHON_UNFORWARD, nil) \
)) \
{ \
python::detail::force_instantiate(instance_finder<held_type>::registration); \
}
BOOST_PYTHON_REPEAT_ARITY_2ND(BOOST_PYTHON_CONSTRUCT_POINTER_HOLDER_BACK_REFERENCE,nil)