Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vnlitvinov committed Sep 2, 2024
1 parent 8047e6b commit df44bd9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions include/pybind11/detail/class.h
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,9 @@ extern "C" inline int pybind11_getbuffer(PyObject *obj, Py_buffer *view, int fla
raise_from(PyExc_BufferError, "Error getting buffer");
return -1;
}
if (info == nullptr) {
pybind11_fail("FATAL UNEXPECTED SITUATION: tinfo->get_buffer() returned nullptr.");
}

if ((flags & PyBUF_WRITABLE) == PyBUF_WRITABLE && info->readonly) {
delete info;
Expand Down
4 changes: 2 additions & 2 deletions include/pybind11/detail/exception_translation.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
pybind11/detail/exception_translation.h: means to translate C++ exceptions to Python exception
pybind11/detail/exception_translation.h: means to translate C++ exceptions to Python exceptions
Copyright (c) 2024-2024 The Pybind Development Team.
Copyright (c) 2024 The Pybind Development Team.
All rights reserved. Use of this source code is governed by a
BSD-style license that can be found in the LICENSE file.
Expand Down

0 comments on commit df44bd9

Please sign in to comment.