(b: &ffi::Py_buffer)
| 155 | } |
| 156 | |
| 157 | fn 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 | |
| 163 | impl PyBuffer { |
| 164 | /// Get the underlying buffer from the specified python object. |