File: buff_converter.h

package info (click to toggle)
python-msgpack 1.0.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 520 kB
  • sloc: python: 2,187; ansic: 1,660; makefile: 183; sh: 43
file content (8 lines) | stat: -rw-r--r-- 220 bytes parent folder | download | duplicates (3)
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);
}