Skip to content

Commit daabb2d

Browse files
Merge pull request xtensor-stack#62 from SylvainCorlay/no-variables
Not using borrow and stolen variables anymore
2 parents 4d2d8e6 + f4bcb0e commit daabb2d

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

include/xtensor-python/pyarray.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,15 +263,15 @@ namespace xt
263263
}
264264

265265
template <class T>
266-
inline pyarray<T>::pyarray(pybind11::handle h, pybind11::object::borrowed_t)
267-
: base_type(h, pybind11::object::borrowed)
266+
inline pyarray<T>::pyarray(pybind11::handle h, pybind11::object::borrowed_t b)
267+
: base_type(h, b)
268268
{
269269
init_from_python();
270270
}
271271

272272
template <class T>
273-
inline pyarray<T>::pyarray(pybind11::handle h, pybind11::object::stolen_t)
274-
: base_type(h, pybind11::object::stolen)
273+
inline pyarray<T>::pyarray(pybind11::handle h, pybind11::object::stolen_t s)
274+
: base_type(h, s)
275275
{
276276
init_from_python();
277277
}

include/xtensor-python/pycontainer.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,14 @@ namespace xt
132132
}
133133

134134
template <class D>
135-
inline pycontainer<D>::pycontainer(pybind11::handle h, borrowed_t)
136-
: pybind11::object(h, borrowed)
135+
inline pycontainer<D>::pycontainer(pybind11::handle h, borrowed_t b)
136+
: pybind11::object(h, b)
137137
{
138138
}
139139

140140
template <class D>
141-
inline pycontainer<D>::pycontainer(pybind11::handle h, stolen_t)
142-
: pybind11::object(h, stolen)
141+
inline pycontainer<D>::pycontainer(pybind11::handle h, stolen_t s)
142+
: pybind11::object(h, s)
143143
{
144144
}
145145

include/xtensor-python/pytensor.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,15 @@ namespace xt
176176
}
177177

178178
template <class T, std::size_t N>
179-
inline pytensor<T, N>::pytensor(pybind11::handle h, pybind11::object::borrowed_t)
180-
: base_type(h, pybind11::object::borrowed)
179+
inline pytensor<T, N>::pytensor(pybind11::handle h, pybind11::object::borrowed_t b)
180+
: base_type(h, b)
181181
{
182182
init_from_python();
183183
}
184184

185185
template <class T, std::size_t N>
186-
inline pytensor<T, N>::pytensor(pybind11::handle h, pybind11::object::stolen_t)
187-
: base_type(h, pybind11::object::stolen)
186+
inline pytensor<T, N>::pytensor(pybind11::handle h, pybind11::object::stolen_t s)
187+
: base_type(h, s)
188188
{
189189
init_from_python();
190190
}

0 commit comments

Comments
 (0)