#if defined(HAVE_SHM_OPEN)
PyDoc_STRVAR(_posixshmem_shm_open__doc__,
"shm_open($module, /, path, flags, mode=511)\n"
"--\n"
"\n"
"Open a shared memory object. Returns a file descriptor (integer).");
#define _POSIXSHMEM_SHM_OPEN_METHODDEF …
static int
_posixshmem_shm_open_impl(PyObject *module, PyObject *path, int flags,
int mode);
static PyObject *
_posixshmem_shm_open(PyObject *module, PyObject *args, PyObject *kwargs)
{ … }
#endif
#if defined(HAVE_SHM_UNLINK)
PyDoc_STRVAR(_posixshmem_shm_unlink__doc__,
"shm_unlink($module, path, /)\n"
"--\n"
"\n"
"Remove a shared memory object (similar to unlink()).\n"
"\n"
"Remove a shared memory object name, and, once all processes have unmapped\n"
"the object, de-allocates and destroys the contents of the associated memory\n"
"region.");
#define _POSIXSHMEM_SHM_UNLINK_METHODDEF …
static PyObject *
_posixshmem_shm_unlink_impl(PyObject *module, PyObject *path);
static PyObject *
_posixshmem_shm_unlink(PyObject *module, PyObject *arg)
{ … }
#endif
#ifndef _POSIXSHMEM_SHM_OPEN_METHODDEF
#define _POSIXSHMEM_SHM_OPEN_METHODDEF
#endif
#ifndef _POSIXSHMEM_SHM_UNLINK_METHODDEF
#define _POSIXSHMEM_SHM_UNLINK_METHODDEF
#endif