MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / validate

Function validate

src/buffer.rs:157–161  ·  view source on GitHub ↗
(b: &ffi::Py_buffer)

Source from the content-addressed store, hash-verified

155}
156
157fn validate(b: &ffi::Py_buffer) {
158 // shape and stride information must be provided when we use PyBUF_FULL_RO
159 assert!(!b.shape.is_null());
160 assert!(!b.strides.is_null());
161}
162
163impl PyBuffer {
164 /// Get the underlying buffer from the specified python object.

Callers 1

getMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected