Give this type a buffer interface.
| 731 | |
| 732 | /// Give this type a buffer interface. |
| 733 | inline void enable_buffer_protocol(PyHeapTypeObject *heap_type) { |
| 734 | heap_type->ht_type.tp_as_buffer = &heap_type->as_buffer; |
| 735 | |
| 736 | heap_type->as_buffer.bf_getbuffer = pybind11_getbuffer; |
| 737 | heap_type->as_buffer.bf_releasebuffer = pybind11_releasebuffer; |
| 738 | } |
| 739 | |
| 740 | /** Create a brand new Python type according to the `type_record` specification. |
| 741 | Return value: New reference. */ |
no outgoing calls
no test coverage detected