MCPcopy Create free account
hub / github.com/pybind/pybind11 / request

Method request

include/pybind11/pytypes.h:2379–2390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2377 PYBIND11_OBJECT_DEFAULT(buffer, object, PyObject_CheckBuffer)
2378
2379 buffer_info request(bool writable = false) const {
2380 int flags = PyBUF_STRIDES | PyBUF_FORMAT;
2381 if (writable) {
2382 flags |= PyBUF_WRITABLE;
2383 }
2384 auto *view = new Py_buffer();
2385 if (PyObject_GetBuffer(m_ptr, view, flags) != 0) {
2386 delete view;
2387 throw error_already_set();
2388 }
2389 return buffer_info(view);
2390 }
2391};
2392
2393class memoryview : public object {

Callers 9

TEST_SUBMODULEFunction · 0.80
TEST_SUBMODULEFunction · 0.80
TEST_SUBMODULEFunction · 0.80
create_recarrayFunction · 0.80
print_recarrayFunction · 0.80
test_array_ctorsFunction · 0.80
TEST_SUBMODULEFunction · 0.80
vector_buffer_implFunction · 0.80
runMethod · 0.80

Calls 1

buffer_infoClass · 0.85

Tested by 7

TEST_SUBMODULEFunction · 0.64
TEST_SUBMODULEFunction · 0.64
TEST_SUBMODULEFunction · 0.64
create_recarrayFunction · 0.64
print_recarrayFunction · 0.64
test_array_ctorsFunction · 0.64
TEST_SUBMODULEFunction · 0.64