Fix source comment typo (#4388)

This commit is contained in:
luzpaz 2022-12-06 12:54:15 -05:00 committed by GitHub
parent a6e75e4d8a
commit a672de7cc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -279,7 +279,7 @@ struct type_caster<Type, typename eigen_tensor_helper<Type>::ValidType> {
case return_value_policy::take_ownership: case return_value_policy::take_ownership:
if (std::is_const<C>::value) { if (std::is_const<C>::value) {
// This cast is ugly, and might be UB in some cases, but we don't have an // This cast is ugly, and might be UB in some cases, but we don't have an
// alterantive here as we must free that memory // alternative here as we must free that memory
Helper::free(const_cast<Type *>(src)); Helper::free(const_cast<Type *>(src));
pybind11_fail("Cannot take ownership of a const reference"); pybind11_fail("Cannot take ownership of a const reference");
} }