Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a6e3474d
Commit
a6e3474d
authored
Jun 12, 2009
by
Alexandre Vassalotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add const qualifier to PyErr_SetFromErrnoWithFilename and to
PyErr_SetFromErrnoWithUnicodeFilename.
parent
c5ae86b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
Include/pyerrors.h
Include/pyerrors.h
+3
-2
Python/errors.c
Python/errors.c
+2
-2
No files found.
Include/pyerrors.h
View file @
a6e3474d
...
...
@@ -185,10 +185,11 @@ PyAPI_FUNC(PyObject *) PyErr_NoMemory(void);
PyAPI_FUNC
(
PyObject
*
)
PyErr_SetFromErrno
(
PyObject
*
);
PyAPI_FUNC
(
PyObject
*
)
PyErr_SetFromErrnoWithFilenameObject
(
PyObject
*
,
PyObject
*
);
PyAPI_FUNC
(
PyObject
*
)
PyErr_SetFromErrnoWithFilename
(
PyObject
*
,
char
*
);
PyAPI_FUNC
(
PyObject
*
)
PyErr_SetFromErrnoWithFilename
(
PyObject
*
,
const
char
*
);
#ifdef MS_WINDOWS
PyAPI_FUNC
(
PyObject
*
)
PyErr_SetFromErrnoWithUnicodeFilename
(
PyObject
*
,
Py_UNICODE
*
);
PyObject
*
,
const
Py_UNICODE
*
);
#endif
/* MS_WINDOWS */
PyAPI_FUNC
(
PyObject
*
)
PyErr_Format
(
PyObject
*
,
const
char
*
,
...)
...
...
Python/errors.c
View file @
a6e3474d
...
...
@@ -371,7 +371,7 @@ PyErr_SetFromErrnoWithFilenameObject(PyObject *exc, PyObject *filenameObject)
PyObject
*
PyErr_SetFromErrnoWithFilename
(
PyObject
*
exc
,
char
*
filename
)
PyErr_SetFromErrnoWithFilename
(
PyObject
*
exc
,
c
onst
c
har
*
filename
)
{
PyObject
*
name
=
filename
?
PyString_FromString
(
filename
)
:
NULL
;
PyObject
*
result
=
PyErr_SetFromErrnoWithFilenameObject
(
exc
,
name
);
...
...
@@ -381,7 +381,7 @@ PyErr_SetFromErrnoWithFilename(PyObject *exc, char *filename)
#ifdef MS_WINDOWS
PyObject
*
PyErr_SetFromErrnoWithUnicodeFilename
(
PyObject
*
exc
,
Py_UNICODE
*
filename
)
PyErr_SetFromErrnoWithUnicodeFilename
(
PyObject
*
exc
,
const
Py_UNICODE
*
filename
)
{
PyObject
*
name
=
filename
?
PyUnicode_FromUnicode
(
filename
,
wcslen
(
filename
))
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment