Skip to content

Commit 6e80c31

Browse files
improved comments
1 parent 3a8a2e3 commit 6e80c31

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/BufferType.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,11 @@ JSObject *BufferType::toJsTypedArray(JSContext *cx, PyObject *pyObject) {
137137
Py_buffer *view = new Py_buffer{};
138138
bool immutable = false;
139139
if (PyObject_GetBuffer(pyObject, view, PyBUF_ND | PyBUF_WRITABLE /* C-contiguous and writable */ | PyBUF_FORMAT) < 0) {
140-
141140
// the buffer is immutable (e.g., Python `bytes` type is read-only)
142141
PyErr_Clear(); // a PyExc_BufferError was raised
143142

144143
if (PyObject_GetBuffer(pyObject, view, PyBUF_ND /* C-contiguous and writable */ | PyBUF_FORMAT) < 0) {
145-
return nullptr; // and a PyExc_BufferError was raised again
144+
return nullptr; // a PyExc_BufferError was raised again
146145
}
147146

148147
immutable = true;

0 commit comments

Comments
 (0)