| 584 | } |
| 585 | |
| 586 | py::memoryview CPointerObj::getMemoryViewObjects(size_t Len) |
| 587 | { |
| 588 | auto PointeeTy = getPointeeType(); |
| 589 | const size_t PointeeSize = PointeeTy->getSize(); |
| 590 | // TODO: check integer overflow |
| 591 | // TODO: ssize_t is an issue |
| 592 | py::buffer_info BI(py::buffer_info{getPtr(), static_cast<ssize_t>(PointeeSize), getFormatDescriptor(PointeeTy), static_cast<ssize_t>(Len)}); |
| 593 | BI.readonly = PointeeTy.hasConst(); |
| 594 | return memoryview_from_buffer_info(BI); |
| 595 | } |
| 596 | |
| 597 | py::memoryview CPointerObj::getMemoryViewCStr() |
| 598 | { |
nothing calls this directly
no test coverage detected