Add patch for Boost.Python to fix pointer registration (#1358725)
This commit is contained in:
parent
f9cbc68d43
commit
0b594070c7
42
boost-1.60-python-regptr.patch
Normal file
42
boost-1.60-python-regptr.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From f2c465ffa508459216f7093bf95ba001ad994206 Mon Sep 17 00:00:00 2001
|
||||
From: vslashg <veloso@verylowsodium.com>
|
||||
Date: Mon, 29 Feb 2016 13:33:35 -0500
|
||||
Subject: [PATCH] Fix auto-pointer registration in Boost Python 1.60.
|
||||
|
||||
The conditional instantiation magic of maybe_register_pointer_to_python() assumes that use_value_holder and use_back_reference will be one of the boost::mpl::bool_ types, but this assumption is no longer true in Boost 1.60, where they can be standard library bool wrappers instead.
|
||||
|
||||
Explicitly defining these types as mpl::bool_ classes fixes https://github.com/boostorg/python/issues/56.
|
||||
---
|
||||
include/boost/python/object/class_metadata.hpp | 12 +++++++-----
|
||||
1 file changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/include/boost/python/object/class_metadata.hpp b/include/boost/python/object/class_metadata.hpp
|
||||
index c71cf67..5009c17 100644
|
||||
--- a/include/boost/python/object/class_metadata.hpp
|
||||
+++ b/include/boost/python/object/class_metadata.hpp
|
||||
@@ -164,7 +164,7 @@ struct class_metadata
|
||||
>::type held_type;
|
||||
|
||||
// Determine if the object will be held by value
|
||||
- typedef is_convertible<held_type*,T*> use_value_holder;
|
||||
+ typedef mpl::bool_<is_convertible<held_type*,T*>::value> use_value_holder;
|
||||
|
||||
// Compute the "wrapped type", that is, if held_type is a smart
|
||||
// pointer, we're talking about the pointee.
|
||||
@@ -175,10 +175,12 @@ struct class_metadata
|
||||
>::type wrapped;
|
||||
|
||||
// Determine whether to use a "back-reference holder"
|
||||
- typedef mpl::or_<
|
||||
- has_back_reference<T>
|
||||
- , is_same<held_type_arg,T>
|
||||
- , is_base_and_derived<T,wrapped>
|
||||
+ typedef mpl::bool_<
|
||||
+ mpl::or_<
|
||||
+ has_back_reference<T>
|
||||
+ , is_same<held_type_arg,T>
|
||||
+ , is_base_and_derived<T,wrapped>
|
||||
+ >::value
|
||||
> use_back_reference;
|
||||
|
||||
// Select the holder.
|
10
boost.spec
10
boost.spec
@ -38,7 +38,7 @@ Name: boost
|
||||
Summary: The free peer-reviewed portable C++ source libraries
|
||||
Version: 1.60.0
|
||||
%global version_enc 1_60_0
|
||||
Release: 8%{?dist}
|
||||
Release: 9%{?dist}
|
||||
License: Boost and MIT and Python
|
||||
|
||||
%global toplev_dirname %{name}_%{version_enc}
|
||||
@ -137,6 +137,10 @@ Patch82: boost-1.60.0-no-rpath.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1349638
|
||||
Patch83: boost-1.60-multiprecision.patch
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1358725
|
||||
# https://github.com/boostorg/python/pull/59/files
|
||||
Patch84: boost-1.60-python-regptr.patch
|
||||
|
||||
%bcond_with tests
|
||||
%bcond_with docs_generated
|
||||
|
||||
@ -649,6 +653,7 @@ a number of significant features and is now developed independently
|
||||
%patch81 -p2
|
||||
%patch82 -p0
|
||||
%patch83 -p2
|
||||
%patch84 -p2
|
||||
|
||||
# At least python2_version needs to be a macro so that it's visible in
|
||||
# %%install as well.
|
||||
@ -1277,6 +1282,9 @@ fi
|
||||
%{_mandir}/man1/bjam.1*
|
||||
|
||||
%changelog
|
||||
* Mon Aug 01 2016 Jonathan Wakely <jwakely@redhat.com> - 1.60.0-9
|
||||
- Add patch for Boost.Python to fix pointer registration (#1358725)
|
||||
|
||||
* Tue Jun 28 2016 Jonathan Wakely <jwakely@redhat.com> - 1.60.0-8
|
||||
- Add patch for Boost.Multiprecision (#1349638)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user