blob: 86b4196df08c18cd99a2361ca91fae99d0a74a6e (
plain)
1
2
3
4
5
6
7
8
|
#include "Python.h"
/* cython does not support this preprocessor check => write it in raw C */
static PyObject *
buff_to_buff(char *buff, Py_ssize_t size)
{
return PyMemoryView_FromMemory(buff, size, PyBUF_READ);
}
|