Skip to content

Commit efa39e6

Browse files
Fix typo in disallow_null where release was not correctly used.
1 parent 362d039 commit efa39e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dynd/include/utility_functions.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ inline py_ref_t<owns_ref, true> disallow_null(py_ref_t<owns_ref, not_null> &&obj
481481
assert(obj.get() != nullptr);
482482
// Assert that the wrapped reference is valid if it is not null.
483483
PYDYND_ASSERT_IF(obj.get() != nullptr, Py_REFCNT(obj.get()) > 0);
484-
return py_ref_t<owns_ref, true>(obj.release(), owns_ref);
484+
return py_ref_t<owns_ref, true>(release(std::forward(obj)), owns_ref);
485485
}
486486

487487
// RAII class to acquire GIL.

0 commit comments

Comments
 (0)