mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-25 14:45:12 +00:00
Remove object::borrowed/stolen
PR #771 deprecated them as they can cause linking failures (#770), but the deprecation tags cause warnings on GCC 5.x through 6.2.x. Removing them entirely will break backwards-compatibility consequences, but the effects should be minimal (only code that was inheriting from `object` could get at them at all as they are protected). Fixes #777
This commit is contained in:
parent
555dc4f07a
commit
16c86638a5
@ -236,11 +236,6 @@ protected:
|
|||||||
// Tags for choosing constructors from raw PyObject *
|
// Tags for choosing constructors from raw PyObject *
|
||||||
struct borrowed_t { };
|
struct borrowed_t { };
|
||||||
struct stolen_t { };
|
struct stolen_t { };
|
||||||
// These can cause linkage problems; see #770
|
|
||||||
PYBIND11_DEPRECATED("Use of the `borrowed` static variable is deprecated; use `borrowed_t{}' instead")
|
|
||||||
static constexpr borrowed_t borrowed{};
|
|
||||||
PYBIND11_DEPRECATED("Use of the `stolen` static variable is deprecated; use `stolen_t{}' instead")
|
|
||||||
static constexpr stolen_t stolen{};
|
|
||||||
|
|
||||||
template <typename T> friend T reinterpret_borrow(handle);
|
template <typename T> friend T reinterpret_borrow(handle);
|
||||||
template <typename T> friend T reinterpret_steal(handle);
|
template <typename T> friend T reinterpret_steal(handle);
|
||||||
|
Loading…
Reference in New Issue
Block a user