summaryrefslogtreecommitdiff
path: root/Modules/clinic
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-12-14 11:56:48 +0200
committerGitHub <noreply@github.com>2018-12-14 11:56:48 +0200
commit45a7b7617e67bd1a8491f5e10ea9d24fe418b52d (patch)
treedaa322b4f51e0c2ce446f8768c73b7d5299d7a00 /Modules/clinic
parent922b2a0d0d9928af420ea4d5c104f8be72517aa2 (diff)
downloadcpython-git-45a7b7617e67bd1a8491f5e10ea9d24fe418b52d.tar.gz
[3.7] bpo-35489: Use "const Py_UNICODE *" for the Py_UNICODE converter in AC. (GH-11150). (GH-11151)
(cherry picked from commit afb3e71a1710c444fbe789b51df43ee16ee9ede7)
Diffstat (limited to 'Modules/clinic')
-rw-r--r--Modules/clinic/_winapi.c.h11
-rw-r--r--Modules/clinic/arraymodule.c.h6
-rw-r--r--Modules/clinic/posixmodule.c.h11
3 files changed, 15 insertions, 13 deletions
diff --git a/Modules/clinic/_winapi.c.h b/Modules/clinic/_winapi.c.h
index 436fbe5494..f4d884237b 100644
--- a/Modules/clinic/_winapi.c.h
+++ b/Modules/clinic/_winapi.c.h
@@ -300,25 +300,26 @@ PyDoc_STRVAR(_winapi_CreateProcess__doc__,
{"CreateProcess", (PyCFunction)_winapi_CreateProcess, METH_FASTCALL, _winapi_CreateProcess__doc__},
static PyObject *
-_winapi_CreateProcess_impl(PyObject *module, Py_UNICODE *application_name,
+_winapi_CreateProcess_impl(PyObject *module,
+ const Py_UNICODE *application_name,
PyObject *command_line, PyObject *proc_attrs,
PyObject *thread_attrs, BOOL inherit_handles,
DWORD creation_flags, PyObject *env_mapping,
- Py_UNICODE *current_directory,
+ const Py_UNICODE *current_directory,
PyObject *startup_info);
static PyObject *
_winapi_CreateProcess(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
- Py_UNICODE *application_name;
+ const Py_UNICODE *application_name;
PyObject *command_line;
PyObject *proc_attrs;
PyObject *thread_attrs;
BOOL inherit_handles;
DWORD creation_flags;
PyObject *env_mapping;
- Py_UNICODE *current_directory;
+ const Py_UNICODE *current_directory;
PyObject *startup_info;
if (!_PyArg_ParseStack(args, nargs, "ZOOOikOZO:CreateProcess",
@@ -943,4 +944,4 @@ _winapi_GetFileType(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P
exit:
return return_value;
}
-/*[clinic end generated code: output=3a6492395b11b5a5 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=896d06ce2290aa86 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/arraymodule.c.h b/Modules/clinic/arraymodule.c.h
index b03a507914..c85d0c6262 100644
--- a/Modules/clinic/arraymodule.c.h
+++ b/Modules/clinic/arraymodule.c.h
@@ -376,14 +376,14 @@ PyDoc_STRVAR(array_array_fromunicode__doc__,
{"fromunicode", (PyCFunction)array_array_fromunicode, METH_O, array_array_fromunicode__doc__},
static PyObject *
-array_array_fromunicode_impl(arrayobject *self, Py_UNICODE *ustr,
+array_array_fromunicode_impl(arrayobject *self, const Py_UNICODE *ustr,
Py_ssize_clean_t ustr_length);
static PyObject *
array_array_fromunicode(arrayobject *self, PyObject *arg)
{
PyObject *return_value = NULL;
- Py_UNICODE *ustr;
+ const Py_UNICODE *ustr;
Py_ssize_clean_t ustr_length;
if (!PyArg_Parse(arg, "u#:fromunicode", &ustr, &ustr_length)) {
@@ -505,4 +505,4 @@ PyDoc_STRVAR(array_arrayiterator___setstate____doc__,
#define ARRAY_ARRAYITERATOR___SETSTATE___METHODDEF \
{"__setstate__", (PyCFunction)array_arrayiterator___setstate__, METH_O, array_arrayiterator___setstate____doc__},
-/*[clinic end generated code: output=1289bde2a095a712 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=2d0fb1937dea02c2 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h
index 3230cd7009..a722e93be2 100644
--- a/Modules/clinic/posixmodule.c.h
+++ b/Modules/clinic/posixmodule.c.h
@@ -1350,7 +1350,7 @@ PyDoc_STRVAR(os_system__doc__,
{"system", (PyCFunction)os_system, METH_FASTCALL|METH_KEYWORDS, os_system__doc__},
static long
-os_system_impl(PyObject *module, Py_UNICODE *command);
+os_system_impl(PyObject *module, const Py_UNICODE *command);
static PyObject *
os_system(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
@@ -1358,7 +1358,7 @@ os_system(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k
PyObject *return_value = NULL;
static const char * const _keywords[] = {"command", NULL};
static _PyArg_Parser _parser = {"u:system", _keywords, 0};
- Py_UNICODE *command;
+ const Py_UNICODE *command;
long _return_value;
if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser,
@@ -5201,7 +5201,8 @@ PyDoc_STRVAR(os_startfile__doc__,
{"startfile", (PyCFunction)os_startfile, METH_FASTCALL|METH_KEYWORDS, os_startfile__doc__},
static PyObject *
-os_startfile_impl(PyObject *module, path_t *filepath, Py_UNICODE *operation);
+os_startfile_impl(PyObject *module, path_t *filepath,
+ const Py_UNICODE *operation);
static PyObject *
os_startfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
@@ -5210,7 +5211,7 @@ os_startfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject
static const char * const _keywords[] = {"filepath", "operation", NULL};
static _PyArg_Parser _parser = {"O&|u:startfile", _keywords, 0};
path_t filepath = PATH_T_INITIALIZE("startfile", "filepath", 0, 0);
- Py_UNICODE *operation = NULL;
+ const Py_UNICODE *operation = NULL;
if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser,
path_converter, &filepath, &operation)) {
@@ -6537,4 +6538,4 @@ exit:
#ifndef OS_GETRANDOM_METHODDEF
#define OS_GETRANDOM_METHODDEF
#endif /* !defined(OS_GETRANDOM_METHODDEF) */
-/*[clinic end generated code: output=c6ca6ad4afa64454 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=df73bd7805978a25 input=a9049054013a1b77]*/