mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
PyFile_WriteString(): change prototype so that the string arg is
const char* instead of char*. The change is conceptually correct, and indirectly fixes a compiler wng introduced when somebody else innocently passed a const char* to this function.
This commit is contained in:
parent
75cdad5584
commit
c1bbcb87aa
2 changed files with 2 additions and 2 deletions
|
@ -21,7 +21,7 @@ extern DL_IMPORT(PyObject *) PyFile_Name(PyObject *);
|
||||||
extern DL_IMPORT(PyObject *) PyFile_GetLine(PyObject *, int);
|
extern DL_IMPORT(PyObject *) PyFile_GetLine(PyObject *, int);
|
||||||
extern DL_IMPORT(int) PyFile_WriteObject(PyObject *, PyObject *, int);
|
extern DL_IMPORT(int) PyFile_WriteObject(PyObject *, PyObject *, int);
|
||||||
extern DL_IMPORT(int) PyFile_SoftSpace(PyObject *, int);
|
extern DL_IMPORT(int) PyFile_SoftSpace(PyObject *, int);
|
||||||
extern DL_IMPORT(int) PyFile_WriteString(char *, PyObject *);
|
extern DL_IMPORT(int) PyFile_WriteString(const char *, PyObject *);
|
||||||
extern DL_IMPORT(int) PyObject_AsFileDescriptor(PyObject *);
|
extern DL_IMPORT(int) PyObject_AsFileDescriptor(PyObject *);
|
||||||
|
|
||||||
/* The default encoding used by the platform file system APIs
|
/* The default encoding used by the platform file system APIs
|
||||||
|
|
|
@ -1634,7 +1634,7 @@ PyFile_WriteObject(PyObject *v, PyObject *f, int flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
PyFile_WriteString(char *s, PyObject *f)
|
PyFile_WriteString(const char *s, PyObject *f)
|
||||||
{
|
{
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
/* Should be caused by a pre-existing error */
|
/* Should be caused by a pre-existing error */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue