Index: Include/abstract.h =================================================================== --- Include/abstract.h (Revision 83123) +++ Include/abstract.h (Arbeitskopie) @@ -283,7 +283,7 @@ */ PyAPI_FUNC(PyObject *) PyObject_CallFunction(PyObject *callable_object, - char *format, ...); + const char *format, ...); /* Call a callable Python object, callable_object, with a @@ -295,8 +295,8 @@ */ - PyAPI_FUNC(PyObject *) PyObject_CallMethod(PyObject *o, char *method, - char *format, ...); + PyAPI_FUNC(PyObject *) PyObject_CallMethod(PyObject *o, const char *method, + const char *format, ...); /* Call the method named m of object o with a variable number of @@ -308,10 +308,10 @@ */ 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, ...); Index: Objects/abstract.c =================================================================== --- Objects/abstract.c (Revision 83123) +++ Objects/abstract.c (Arbeitskopie) @@ -2186,7 +2186,7 @@ } PyObject * -PyObject_CallFunction(PyObject *callable, char *format, ...) +PyObject_CallFunction(PyObject *callable, const char *format, ...) { va_list va; PyObject *args; @@ -2206,7 +2206,7 @@ } PyObject * -_PyObject_CallFunction_SizeT(PyObject *callable, char *format, ...) +_PyObject_CallFunction_SizeT(PyObject *callable, const char *format, ...) { va_list va; PyObject *args; @@ -2226,7 +2226,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; @@ -2265,7 +2265,7 @@ } 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; Index: Doc/c-api/object.rst =================================================================== --- Doc/c-api/object.rst (Revision 83123) +++ Doc/c-api/object.rst (Arbeitskopie) @@ -208,7 +208,7 @@ of the Python expression ``callable_object(*args)``. -.. cfunction:: PyObject* PyObject_CallFunction(PyObject *callable, char *format, ...) +.. cfunction:: 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 :cfunc:`Py_BuildValue` style format @@ -219,7 +219,7 @@ faster alternative. -.. cfunction:: PyObject* PyObject_CallMethod(PyObject *o, char *method, char *format, ...) +.. cfunction:: 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 :cfunc:`Py_BuildValue` format Index: Doc/faq/extending.rst =================================================================== --- Doc/faq/extending.rst (Revision 83123) +++ Doc/faq/extending.rst (Arbeitskopie) @@ -121,8 +121,8 @@ argument values:: PyObject * - PyObject_CallMethod(PyObject *object, char *method_name, - char *arg_format, ...); + PyObject_CallMethod(PyObject *object, const char *method_name, + const char *arg_format, ...); This works for any object that has methods -- whether built-in or user-defined. You are responsible for eventually :cfunc:`Py_DECREF`\ 'ing the return value. Index: Doc/data/refcounts.dat =================================================================== --- Doc/data/refcounts.dat (Revision 83123) +++ Doc/data/refcounts.dat (Arbeitskopie) @@ -905,7 +905,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: @@ -914,8 +914,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: