mirror of https://github.com/python/cpython
gh-117873: Revert _posixshmem.shm_open() change (#118901)
This commit is contained in:
parent
f526314194
commit
7d7eec595a
|
@ -5,7 +5,7 @@ preserve
|
||||||
#if defined(HAVE_SHM_OPEN)
|
#if defined(HAVE_SHM_OPEN)
|
||||||
|
|
||||||
PyDoc_STRVAR(_posixshmem_shm_open__doc__,
|
PyDoc_STRVAR(_posixshmem_shm_open__doc__,
|
||||||
"shm_open($module, path, /, flags, mode=511)\n"
|
"shm_open($module, /, path, flags, mode=511)\n"
|
||||||
"--\n"
|
"--\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Open a shared memory object. Returns a file descriptor (integer).");
|
"Open a shared memory object. Returns a file descriptor (integer).");
|
||||||
|
@ -21,7 +21,7 @@ static PyObject *
|
||||||
_posixshmem_shm_open(PyObject *module, PyObject *args, PyObject *kwargs)
|
_posixshmem_shm_open(PyObject *module, PyObject *args, PyObject *kwargs)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
static char *_keywords[] = {"", "flags", "mode", NULL};
|
static char *_keywords[] = {"path", "flags", "mode", NULL};
|
||||||
PyObject *path;
|
PyObject *path;
|
||||||
int flags;
|
int flags;
|
||||||
int mode = 511;
|
int mode = 511;
|
||||||
|
@ -86,4 +86,4 @@ exit:
|
||||||
#ifndef _POSIXSHMEM_SHM_UNLINK_METHODDEF
|
#ifndef _POSIXSHMEM_SHM_UNLINK_METHODDEF
|
||||||
#define _POSIXSHMEM_SHM_UNLINK_METHODDEF
|
#define _POSIXSHMEM_SHM_UNLINK_METHODDEF
|
||||||
#endif /* !defined(_POSIXSHMEM_SHM_UNLINK_METHODDEF) */
|
#endif /* !defined(_POSIXSHMEM_SHM_UNLINK_METHODDEF) */
|
||||||
/*[clinic end generated code: output=649877fc45a65129 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=74588a5abba6e36c input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -32,7 +32,6 @@ module _posixshmem
|
||||||
/*[clinic input]
|
/*[clinic input]
|
||||||
_posixshmem.shm_open -> int
|
_posixshmem.shm_open -> int
|
||||||
path: unicode
|
path: unicode
|
||||||
/
|
|
||||||
flags: int
|
flags: int
|
||||||
mode: int = 0o777
|
mode: int = 0o777
|
||||||
|
|
||||||
|
@ -45,7 +44,7 @@ Open a shared memory object. Returns a file descriptor (integer).
|
||||||
static int
|
static int
|
||||||
_posixshmem_shm_open_impl(PyObject *module, PyObject *path, int flags,
|
_posixshmem_shm_open_impl(PyObject *module, PyObject *path, int flags,
|
||||||
int mode)
|
int mode)
|
||||||
/*[clinic end generated code: output=8d110171a4fa20df input=0585935e1d3c8050]*/
|
/*[clinic end generated code: output=8d110171a4fa20df input=e83b58fa802fac25]*/
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
int async_err = 0;
|
int async_err = 0;
|
||||||
|
|
Loading…
Reference in New Issue