summaryrefslogtreecommitdiff
path: root/libs/python/src/tuple.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/python/src/tuple.cpp')
-rw-r--r--libs/python/src/tuple.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/python/src/tuple.cpp b/libs/python/src/tuple.cpp
index 6719713b73..1c38d904c8 100644
--- a/libs/python/src/tuple.cpp
+++ b/libs/python/src/tuple.cpp
@@ -8,9 +8,10 @@ namespace boost { namespace python { namespace detail {
detail::new_reference tuple_base::call(object const& arg_)
{
+ union { PyTypeObject *ptop; PyObject *pop; }pun = { &PyTuple_Type };
+
return (detail::new_reference)PyObject_CallFunction(
- (PyObject*)&PyTuple_Type, const_cast<char*>("(O)"),
- arg_.ptr());
+ pun.pop, const_cast<char*>("(O)"), arg_.ptr());
}
tuple_base::tuple_base()