mirror of
https://github.com/boostorg/python.git
synced 2026-01-22 17:32:55 +00:00
Take typeid(T&) rather than typeid(T). For some some compilers won't
let you get away with typeid(T) when T is an incomplete class type (that's conforming behavior), but GCC at least will allow typeid(T&) -- also disallowed by the standard when T is incomplete. If it turns out that EDGs also barf on typeid(T&), we may have more work to do. Some warning suppression for MSVC. [SVN r29020]
This commit is contained in:
@@ -81,7 +81,7 @@ namespace detail
|
||||
registry_lookup(T&(*)())
|
||||
{
|
||||
detail::register_shared_ptr1((T*)0);
|
||||
return registry::lookup(type_id<T>());
|
||||
return registry::lookup(type_id<T&>());
|
||||
}
|
||||
|
||||
template <class T>
|
||||
|
||||
@@ -74,8 +74,15 @@ namespace
|
||||
|
||||
// Get the location in which to construct
|
||||
void* storage = ((rvalue_from_python_storage<T>*)data)->storage.bytes;
|
||||
new (storage) T(SlotPolicy::extract(intermediate.get()));
|
||||
|
||||
# ifdef _MSC_VER
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable:4244)
|
||||
# endif
|
||||
new (storage) T( SlotPolicy::extract(intermediate.get()) );
|
||||
|
||||
# ifdef _MSC_VER
|
||||
# pragma warning(pop)
|
||||
# endif
|
||||
// record successful construction
|
||||
data->convertible = storage;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
# ifdef _MSC_VER
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable:4297)
|
||||
# pragma warning(disable:4535)
|
||||
extern "C" void straight_to_debugger(unsigned int, EXCEPTION_POINTERS*)
|
||||
{
|
||||
throw;
|
||||
|
||||
@@ -7,16 +7,8 @@
|
||||
# include <boost/python/module.hpp>
|
||||
# include <boost/python/return_value_policy.hpp>
|
||||
|
||||
# if BOOST_WORKAROUND(__GNUC__, == 2) \
|
||||
|| BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(3)) \
|
||||
&& BOOST_WORKAROUND(__GNUC_MINOR__, BOOST_TESTED_AT(3)) \
|
||||
&& BOOST_WORKAROUND(__GNUC_PATCHLEVEL__, BOOST_TESTED_AT(3))
|
||||
typedef struct opaque_ {} *opaque;
|
||||
typedef struct opaque2_ {} *opaque2;
|
||||
# else
|
||||
typedef struct opaque_ *opaque;
|
||||
typedef struct opaque2_ *opaque2;
|
||||
# endif
|
||||
|
||||
opaque the_op = ((opaque) 0x47110815);
|
||||
opaque2 the_op2 = ((opaque2) 0x08154711);
|
||||
|
||||
Reference in New Issue
Block a user