summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-05-29 15:50:54 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-05-29 15:50:54 (GMT)
commit1cfebc73e0ecbcde0b564567606882d70c7812ec (patch)
treeca375e40efe5b44abc67c402ac6864903696b47f /Doc
parent8d90e383a3517a13d752625231584967397d8ba2 (diff)
downloadcpython-1cfebc73e0ecbcde0b564567606882d70c7812ec.zip
cpython-1cfebc73e0ecbcde0b564567606882d70c7812ec.tar.gz
cpython-1cfebc73e0ecbcde0b564567606882d70c7812ec.tar.bz2
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')
-rw-r--r--Doc/c-api/object.rst10
-rw-r--r--Doc/data/refcounts.dat8
2 files changed, 12 insertions, 6 deletions
diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst
index 02a0d36..791cdbb 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)
diff --git a/Doc/data/refcounts.dat b/Doc/data/refcounts.dat
index f298238..0b56fe5 100644
--- a/Doc/data/refcounts.dat
+++ b/Doc/data/refcounts.dat
@@ -218,7 +218,7 @@ PyDict_GetItem:PyObject*:key:0:
PyDict_GetItemString:PyObject*::0:
PyDict_GetItemString:PyObject*:p:0:
-PyDict_GetItemString:char*:key::
+PyDict_GetItemString:const char*:key::
PyDict_SetDefault:PyObject*::0:
PyDict_SetDefault:PyObject*:p:0:
@@ -917,7 +917,7 @@ PyObject_Call:PyObject*:kw:0:
PyObject_CallFunction:PyObject*::+1:
PyObject_CallFunction:PyObject*:callable_object:0:
-PyObject_CallFunction:char*:format::
+PyObject_CallFunction:const char*:format::
PyObject_CallFunction::...::
PyObject_CallFunctionObjArgs:PyObject*::+1:
@@ -926,8 +926,8 @@ PyObject_CallFunctionObjArgs::...::
PyObject_CallMethod:PyObject*::+1:
PyObject_CallMethod:PyObject*:o:0:
-PyObject_CallMethod:char*:m::
-PyObject_CallMethod:char*:format::
+PyObject_CallMethod:const char*:m::
+PyObject_CallMethod:const char*:format::
PyObject_CallMethod::...::
PyObject_CallMethodObjArgs:PyObject*::+1: