Issue #3080: Mark _PyImport_FindBuiltin() argument as constant

And as a consequence, mark also name argument of
_PyImport_FindExtensionUnicode() constant too. But I plan to change this
argument type to PyObject* later.
This commit is contained in:
Victor Stinner 2011-02-23 00:02:00 +00:00
parent d7e76405c7
commit 501c09a754
2 changed files with 4 additions and 4 deletions

View File

@ -65,9 +65,9 @@ PyAPI_FUNC(int) _PyImport_ReleaseLock(void);
PyAPI_FUNC(void) _PyImport_ReInitLock(void);
PyAPI_FUNC(PyObject *)_PyImport_FindBuiltin(
char *name /* UTF-8 encoded string */
const char *name /* UTF-8 encoded string */
);
PyAPI_FUNC(PyObject *)_PyImport_FindExtensionUnicode(char *, PyObject *);
PyAPI_FUNC(PyObject *)_PyImport_FindExtensionUnicode(const char *, PyObject *);
PyAPI_FUNC(int)_PyImport_FixupBuiltin(
PyObject *mod,
char *name /* UTF-8 encoded string */

View File

@ -636,7 +636,7 @@ _PyImport_FixupBuiltin(PyObject *mod, char *name)
}
PyObject *
_PyImport_FindExtensionUnicode(char *name, PyObject *filename)
_PyImport_FindExtensionUnicode(const char *name, PyObject *filename)
{
PyObject *mod, *mdict;
PyModuleDef* def;
@ -680,7 +680,7 @@ _PyImport_FindExtensionUnicode(char *name, PyObject *filename)
}
PyObject *
_PyImport_FindBuiltin(char *name)
_PyImport_FindBuiltin(const char *name)
{
PyObject *res, *filename;
filename = PyUnicode_FromString(name);