diff -r f2353e74b335 Doc/c-api/object.rst --- a/Doc/c-api/object.rst Tue Jan 08 23:12:00 2013 +0200 +++ b/Doc/c-api/object.rst Wed Jan 09 17:00:48 2013 +0100 @@ -247,7 +247,7 @@ ``callable_object(*args)``. -.. c:function:: PyObject* PyObject_CallFunction(PyObject *callable, char *format, ...) +.. c:function:: PyObject* PyObject_CallFunction(PyObject *callable, const char *format, ...) .. index:: builtin: apply @@ -259,8 +259,11 @@ ``callable(*args)``. Note that if you only pass :c:type:`PyObject \*` args, :c:func:`PyObject_CallFunctionObjArgs` is a faster alternative. + .. versionchanged:: 3.4 + The type of *format* type 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 @@ -270,6 +273,9 @@ 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 -r f2353e74b335 Doc/data/refcounts.dat --- a/Doc/data/refcounts.dat Tue Jan 08 23:12:00 2013 +0200 +++ b/Doc/data/refcounts.dat Wed Jan 09 17:00:48 2013 +0100 @@ -218,7 +218,7 @@ PyDict_GetItemString:PyObject*::0: PyDict_GetItemString:PyObject*:p:0: -PyDict_GetItemString:char*:key:: +PyDict_GetItemString:const char*:key:: PyDict_Items:PyObject*::+1: PyDict_Items:PyObject*:p:0: @@ -917,7 +917,7 @@ 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_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: diff -r f2353e74b335 Include/abstract.h --- a/Include/abstract.h Tue Jan 08 23:12:00 2013 +0200 +++ b/Include/abstract.h Wed Jan 09 17:00:48 2013 +0100 @@ -324,7 +324,7 @@ */ PyAPI_FUNC(PyObject *) PyObject_CallFunction(PyObject *callable_object, - char *format, ...); + const char *format, ...); /* Call a callable Python object, callable_object, with a @@ -337,8 +337,8 @@ */ - PyAPI_FUNC(PyObject *) PyObject_CallMethod(PyObject *o, char *m, - char *format, ...); + PyAPI_FUNC(PyObject *) PyObject_CallMethod(PyObject *o, const char *m, + const char *format, ...); /* Call the method named m of object o with a variable number of @@ -350,10 +350,12 @@ */ PyAPI_FUNC(PyObject *) _PyObject_CallFunction_SizeT(PyObject *callable, - char *format, ...); + const char *format, + ...); PyAPI_FUNC(PyObject *) _PyObject_CallMethod_SizeT(PyObject *o, - char *name, - char *format, ...); + const char *name, + const char *format, + ...); PyAPI_FUNC(PyObject *) PyObject_CallFunctionObjArgs(PyObject *callable, ...); diff -r f2353e74b335 Objects/abstract.c --- a/Objects/abstract.c Tue Jan 08 23:12:00 2013 +0200 +++ b/Objects/abstract.c Wed Jan 09 17:00:48 2013 +0100 @@ -2566,7 +2566,7 @@ } PyObject * -PyObject_CallFunction(PyObject *callable, char *format, ...) +PyObject_CallFunction(PyObject *callable, const char *format, ...) { va_list va; PyObject *args; @@ -2586,7 +2586,7 @@ } PyObject * -_PyObject_CallFunction_SizeT(PyObject *callable, char *format, ...) +_PyObject_CallFunction_SizeT(PyObject *callable, const char *format, ...) { va_list va; PyObject *args; @@ -2606,7 +2606,7 @@ } PyObject * -PyObject_CallMethod(PyObject *o, char *name, char *format, ...) +PyObject_CallMethod(PyObject *o, const char *name, const char *format, ...) { va_list va; PyObject *args; @@ -2645,7 +2645,8 @@ } PyObject * -_PyObject_CallMethod_SizeT(PyObject *o, char *name, char *format, ...) +_PyObject_CallMethod_SizeT(PyObject *o, const char *name, const char *format, + ...) { va_list va; PyObject *args;