mirror of
https://github.com/boostorg/python.git
synced 2026-01-22 05:22:45 +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:
@@ -1,4 +1,4 @@
|
||||
#include <boost/python/converter/from_python.hpp>
|
||||
#include <boost/python/converter/arg_from_python.hpp>
|
||||
#include <boost/python/type_id.hpp>
|
||||
#include <iostream>
|
||||
|
||||
@@ -28,128 +28,128 @@ int main()
|
||||
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int>::type, rvalue_from_python<int>
|
||||
select_arg_from_python<int>::type, arg_rvalue_from_python<int>
|
||||
);
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int const>::type, rvalue_from_python<int const>
|
||||
select_arg_from_python<int const>::type, arg_rvalue_from_python<int const>
|
||||
);
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int volatile>::type, rvalue_from_python<int volatile>
|
||||
select_arg_from_python<int volatile>::type, arg_rvalue_from_python<int volatile>
|
||||
);
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int const volatile>::type, rvalue_from_python<int const volatile>
|
||||
select_arg_from_python<int const volatile>::type, arg_rvalue_from_python<int const volatile>
|
||||
);
|
||||
|
||||
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int*>::type, pointer_from_python<int*>
|
||||
select_arg_from_python<int*>::type, pointer_arg_from_python<int*>
|
||||
);
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int const*>::type, pointer_from_python<int const*>
|
||||
select_arg_from_python<int const*>::type, pointer_arg_from_python<int const*>
|
||||
);
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int volatile*>::type, pointer_from_python<int volatile*>
|
||||
select_arg_from_python<int volatile*>::type, pointer_arg_from_python<int volatile*>
|
||||
);
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int const volatile*>::type, pointer_from_python<int const volatile*>
|
||||
select_arg_from_python<int const volatile*>::type, pointer_arg_from_python<int const volatile*>
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int&>::type, reference_from_python<int&>
|
||||
select_arg_from_python<int&>::type, reference_arg_from_python<int&>
|
||||
);
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int const&>::type, rvalue_from_python<int const&>
|
||||
select_arg_from_python<int const&>::type, arg_rvalue_from_python<int const&>
|
||||
);
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int volatile&>::type, reference_from_python<int volatile&>
|
||||
select_arg_from_python<int volatile&>::type, reference_arg_from_python<int volatile&>
|
||||
);
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int const volatile&>::type, reference_from_python<int const volatile&>
|
||||
select_arg_from_python<int const volatile&>::type, reference_arg_from_python<int const volatile&>
|
||||
);
|
||||
|
||||
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int*&>::type, reference_from_python<int*&>
|
||||
select_arg_from_python<int*&>::type, reference_arg_from_python<int*&>
|
||||
);
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int const*&>::type, reference_from_python<int const*&>
|
||||
select_arg_from_python<int const*&>::type, reference_arg_from_python<int const*&>
|
||||
);
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int volatile*&>::type, reference_from_python<int volatile*&>
|
||||
select_arg_from_python<int volatile*&>::type, reference_arg_from_python<int volatile*&>
|
||||
);
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int const volatile*&>::type, reference_from_python<int const volatile*&>
|
||||
select_arg_from_python<int const volatile*&>::type, reference_arg_from_python<int const volatile*&>
|
||||
);
|
||||
|
||||
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int* const&>::type, pointer_const_reference_from_python<int*const&>
|
||||
select_arg_from_python<int* const&>::type, pointer_cref_arg_from_python<int*const&>
|
||||
);
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int const* const&>::type, pointer_const_reference_from_python<int const*const&>
|
||||
select_arg_from_python<int const* const&>::type, pointer_cref_arg_from_python<int const*const&>
|
||||
);
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int volatile* const&>::type, pointer_const_reference_from_python<int volatile*const&>
|
||||
select_arg_from_python<int volatile* const&>::type, pointer_cref_arg_from_python<int volatile*const&>
|
||||
);
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int const volatile* const&>::type, pointer_const_reference_from_python<int const volatile*const&>
|
||||
select_arg_from_python<int const volatile* const&>::type, pointer_cref_arg_from_python<int const volatile*const&>
|
||||
);
|
||||
|
||||
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int*volatile&>::type, reference_from_python<int*volatile&>
|
||||
select_arg_from_python<int*volatile&>::type, reference_arg_from_python<int*volatile&>
|
||||
);
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int const*volatile&>::type, reference_from_python<int const*volatile&>
|
||||
select_arg_from_python<int const*volatile&>::type, reference_arg_from_python<int const*volatile&>
|
||||
);
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int volatile*volatile&>::type, reference_from_python<int volatile*volatile&>
|
||||
select_arg_from_python<int volatile*volatile&>::type, reference_arg_from_python<int volatile*volatile&>
|
||||
);
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int const volatile*volatile&>::type, reference_from_python<int const volatile*volatile&>
|
||||
select_arg_from_python<int const volatile*volatile&>::type, reference_arg_from_python<int const volatile*volatile&>
|
||||
);
|
||||
|
||||
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int*const volatile&>::type, reference_from_python<int*const volatile&>
|
||||
select_arg_from_python<int*const volatile&>::type, reference_arg_from_python<int*const volatile&>
|
||||
);
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int const*const volatile&>::type, reference_from_python<int const*const volatile&>
|
||||
select_arg_from_python<int const*const volatile&>::type, reference_arg_from_python<int const*const volatile&>
|
||||
);
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int volatile*const volatile&>::type, reference_from_python<int volatile*const volatile&>
|
||||
select_arg_from_python<int volatile*const volatile&>::type, reference_arg_from_python<int volatile*const volatile&>
|
||||
);
|
||||
|
||||
ASSERT_SAME(
|
||||
select_from_python<int const volatile*const volatile&>::type, reference_from_python<int const volatile*const volatile&>
|
||||
select_arg_from_python<int const volatile*const volatile&>::type, reference_arg_from_python<int const volatile*const volatile&>
|
||||
);
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user