diff --git a/doc/v2/Dereferenceable.html b/doc/v2/Dereferenceable.html
index fdea0fc0..43a56a0a 100644
--- a/doc/v2/Dereferenceable.html
+++ b/doc/v2/Dereferenceable.html
@@ -59,7 +59,7 @@ If x is not a pointer type, it also must satsify the followi
- x.get() |
+ get_pointer( x ) |
&*x, or a null pointer
|
diff --git a/include/boost/python/handle.hpp b/include/boost/python/handle.hpp
index fee589bf..338cd3c2 100755
--- a/include/boost/python/handle.hpp
+++ b/include/boost/python/handle.hpp
@@ -137,6 +137,19 @@ class handle
T* m_p;
};
+#ifdef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
+} // namespace python
+#endif
+
+template inline T * get_pointer(python::handle const & p)
+{
+ return p.get();
+}
+
+#ifdef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
+namespace python {
+#endif
+
typedef handle type_handle;
//
diff --git a/include/boost/python/object/make_ptr_instance.hpp b/include/boost/python/object/make_ptr_instance.hpp
index 169106f4..a69afab3 100644
--- a/include/boost/python/object/make_ptr_instance.hpp
+++ b/include/boost/python/object/make_ptr_instance.hpp
@@ -10,10 +10,19 @@
# include
# include
# include
+# include
# include
namespace boost { namespace python { namespace objects {
+# if BOOST_WORKAROUND(__GNUC__, == 2)
+// A weird ADL bug prevents this being found
+template T * get_pointer(T * p)
+{
+ return p;
+}
+# endif
+
template
struct make_ptr_instance
: make_instance_impl >
@@ -27,6 +36,7 @@ struct make_ptr_instance
template
static inline PyTypeObject* get_class_object(Ptr const& x)
{
+ using ::boost::get_pointer;
return get_class_object_impl(get_pointer(x));
}
diff --git a/include/boost/python/object/pointer_holder.hpp b/include/boost/python/object/pointer_holder.hpp
index cc114925..4868c58a 100644
--- a/include/boost/python/object/pointer_holder.hpp
+++ b/include/boost/python/object/pointer_holder.hpp
@@ -9,6 +9,7 @@
# ifndef POINTER_HOLDER_DWA20011215_HPP
# define POINTER_HOLDER_DWA20011215_HPP
+# include
# include
# include
@@ -34,7 +35,7 @@ namespace boost { namespace python { namespace objects {
template
bool is_null(T const& p, ...)
{
- return p.get() == 0;
+ return get_pointer(p) == 0;
}
template
diff --git a/include/boost/python/suite/indexing/detail/indexing_suite_detail.hpp b/include/boost/python/suite/indexing/detail/indexing_suite_detail.hpp
index 10aa0954..4d192a49 100644
--- a/include/boost/python/suite/indexing/detail/indexing_suite_detail.hpp
+++ b/include/boost/python/suite/indexing/detail/indexing_suite_detail.hpp
@@ -9,8 +9,8 @@
# include
# include
-# include
# include
+# include
# include
# include