diff options
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/dict.rst | 2 | ||||
-rw-r--r-- | Doc/c-api/file.rst | 2 | ||||
-rw-r--r-- | Doc/c-api/import.rst | 8 | ||||
-rw-r--r-- | Doc/c-api/long.rst | 2 | ||||
-rw-r--r-- | Doc/c-api/mapping.rst | 6 | ||||
-rw-r--r-- | Doc/c-api/veryhigh.rst | 2 |
6 files changed, 11 insertions, 11 deletions
diff --git a/Doc/c-api/dict.rst b/Doc/c-api/dict.rst index 1f599fe..5a9dca2 100644 --- a/Doc/c-api/dict.rst +++ b/Doc/c-api/dict.rst @@ -84,7 +84,7 @@ Dictionary Objects on failure. -.. c:function:: int PyDict_DelItemString(PyObject *p, char *key) +.. c:function:: int PyDict_DelItemString(PyObject *p, const char *key) Remove the entry in dictionary *p* which has a key specified by the string *key*. Return ``0`` on success or ``-1`` on failure. diff --git a/Doc/c-api/file.rst b/Doc/c-api/file.rst index cc190c9..6f2ecee 100644 --- a/Doc/c-api/file.rst +++ b/Doc/c-api/file.rst @@ -17,7 +17,7 @@ error reporting in the interpreter; third-party code is advised to access the :mod:`io` APIs instead. -.. c:function:: PyFile_FromFd(int fd, char *name, char *mode, int buffering, char *encoding, char *errors, char *newline, int closefd) +.. c:function:: PyFile_FromFd(int fd, const char *name, const char *mode, int buffering, const char *encoding, const char *errors, const char *newline, int closefd) Create a Python file object from the file descriptor of an already opened file *fd*. The arguments *name*, *encoding*, *errors* and *newline* diff --git a/Doc/c-api/import.rst b/Doc/c-api/import.rst index 270152e..6cd2b8b 100644 --- a/Doc/c-api/import.rst +++ b/Doc/c-api/import.rst @@ -118,7 +118,7 @@ Importing Modules encoded string instead of a Unicode object. -.. c:function:: PyObject* PyImport_ExecCodeModule(char *name, PyObject *co) +.. c:function:: PyObject* PyImport_ExecCodeModule(const char *name, PyObject *co) .. index:: builtin: compile @@ -145,7 +145,7 @@ Importing Modules :c:func:`PyImport_ExecCodeModuleWithPathnames`. -.. c:function:: PyObject* PyImport_ExecCodeModuleEx(char *name, PyObject *co, char *pathname) +.. c:function:: PyObject* PyImport_ExecCodeModuleEx(const char *name, PyObject *co, const char *pathname) Like :c:func:`PyImport_ExecCodeModule`, but the :attr:`__file__` attribute of the module object is set to *pathname* if it is non-``NULL``. @@ -162,7 +162,7 @@ Importing Modules .. versionadded:: 3.3 -.. c:function:: PyObject* PyImport_ExecCodeModuleWithPathnames(char *name, PyObject *co, char *pathname, char *cpathname) +.. c:function:: PyObject* PyImport_ExecCodeModuleWithPathnames(const char *name, PyObject *co, const char *pathname, const char *cpathname) Like :c:func:`PyImport_ExecCodeModuleObject`, but *name*, *pathname* and *cpathname* are UTF-8 encoded strings. Attempts are also made to figure out @@ -246,7 +246,7 @@ Importing Modules .. versionadded:: 3.3 -.. c:function:: int PyImport_ImportFrozenModule(char *name) +.. c:function:: int PyImport_ImportFrozenModule(const char *name) Similar to :c:func:`PyImport_ImportFrozenModuleObject`, but the name is a UTF-8 encoded string instead of a Unicode object. diff --git a/Doc/c-api/long.rst b/Doc/c-api/long.rst index d5430fd..b348015 100644 --- a/Doc/c-api/long.rst +++ b/Doc/c-api/long.rst @@ -80,7 +80,7 @@ All integers are implemented as "long" integer objects of arbitrary size. *NULL* on failure. -.. c:function:: PyObject* PyLong_FromString(char *str, char **pend, int base) +.. c:function:: PyObject* PyLong_FromString(const char *str, char **pend, int base) Return a new :c:type:`PyLongObject` based on the string value in *str*, which is interpreted according to the radix in *base*. If *pend* is non-*NULL*, diff --git a/Doc/c-api/mapping.rst b/Doc/c-api/mapping.rst index 0ef2961..2803fd0 100644 --- a/Doc/c-api/mapping.rst +++ b/Doc/c-api/mapping.rst @@ -22,7 +22,7 @@ Mapping Protocol expression ``len(o)``. -.. c:function:: int PyMapping_DelItemString(PyObject *o, char *key) +.. c:function:: int PyMapping_DelItemString(PyObject *o, const char *key) Remove the mapping for object *key* from the object *o*. Return ``-1`` on failure. This is equivalent to the Python statement ``del o[key]``. @@ -67,13 +67,13 @@ Mapping Protocol the Python expression ``list(o.items())``. -.. c:function:: PyObject* PyMapping_GetItemString(PyObject *o, char *key) +.. c:function:: PyObject* PyMapping_GetItemString(PyObject *o, const char *key) Return element of *o* corresponding to the object *key* or *NULL* on failure. This is the equivalent of the Python expression ``o[key]``. -.. c:function:: int PyMapping_SetItemString(PyObject *o, char *key, PyObject *v) +.. c:function:: int PyMapping_SetItemString(PyObject *o, const char *key, PyObject *v) Map the object *key* to the value *v* in object *o*. Returns ``-1`` on failure. This is the equivalent of the Python statement ``o[key] = v``. diff --git a/Doc/c-api/veryhigh.rst b/Doc/c-api/veryhigh.rst index a129963..9f21b89 100644 --- a/Doc/c-api/veryhigh.rst +++ b/Doc/c-api/veryhigh.rst @@ -155,7 +155,7 @@ the same library that the Python runtime is using. Python source code. -.. c:var:: char* (*PyOS_ReadlineFunctionPointer)(FILE *, FILE *, char *) +.. c:var:: char* (*PyOS_ReadlineFunctionPointer)(FILE *, FILE *, const char *) Can be set to point to a function with the prototype ``char *func(FILE *stdin, FILE *stdout, char *prompt)``, |