summaryrefslogtreecommitdiff
path: root/Doc/c-api/object.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-05-29 18:50:54 +0300
committerSerhiy Storchaka <storchaka@gmail.com>2013-05-29 18:50:54 +0300
commit311eb0400f5718391b1b6ab7b54b2f155730c433 (patch)
tree93b2af0269272e9d7672a69df05b76a266b0effa /Doc/c-api/object.rst
parent6c38c7f35c99ad50da21e20cf3decb0d4391e096 (diff)
downloadcpython-311eb0400f5718391b1b6ab7b54b2f155730c433.tar.gz
Issue #9369: The types of `char*` arguments of PyObject_CallFunction() and
PyObject_CallMethod() now changed to `const char*`. Based on patches by J?rg M?ller and Lars Buitinck.
Diffstat (limited to 'Doc/c-api/object.rst')
-rw-r--r--Doc/c-api/object.rst10
1 files changed, 8 insertions, 2 deletions
diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst
index 02a0d36499..791cdbb042 100644
--- a/Doc/c-api/object.rst
+++ b/Doc/c-api/object.rst
@@ -240,7 +240,7 @@ is considered sufficient for this determination.
of the Python expression ``callable_object(*args)``.
-.. c:function:: PyObject* PyObject_CallFunction(PyObject *callable, char *format, ...)
+.. c:function:: PyObject* PyObject_CallFunction(PyObject *callable, const char *format, ...)
Call a callable Python object *callable*, with a variable number of C arguments.
The C arguments are described using a :c:func:`Py_BuildValue` style format
@@ -250,8 +250,11 @@ is considered sufficient for this determination.
pass :c:type:`PyObject \*` args, :c:func:`PyObject_CallFunctionObjArgs` is a
faster alternative.
+ .. versionchanged:: 3.4
+ The type of *format* was changed from ``char *``.
-.. c:function:: PyObject* PyObject_CallMethod(PyObject *o, char *method, char *format, ...)
+
+.. c:function:: PyObject* PyObject_CallMethod(PyObject *o, const char *method, const char *format, ...)
Call the method named *method* of object *o* with a variable number of C
arguments. The C arguments are described by a :c:func:`Py_BuildValue` format
@@ -261,6 +264,9 @@ is considered sufficient for this determination.
Note that if you only pass :c:type:`PyObject \*` args,
:c:func:`PyObject_CallMethodObjArgs` is a faster alternative.
+ .. versionchanged:: 3.4
+ The types of *method* and *format* were changed from ``char *``.
+
.. c:function:: PyObject* PyObject_CallFunctionObjArgs(PyObject *callable, ..., NULL)