Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(261112)

Unified Diff: Doc/c-api/exceptions.rst

Issue 11619: On Windows, don't encode filenames in the import machinery
Patch Set: Created 5 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Include/ast.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Doc/c-api/exceptions.rst Mon Aug 26 14:05:19 2013 +0200
+++ b/Doc/c-api/exceptions.rst Mon Aug 26 16:10:52 2013 +0200
@@ -293,20 +293,27 @@ in various ways. There is a separate er
.. versionadded:: 3.3
-.. c:function:: void PyErr_SyntaxLocationEx(char *filename, int lineno, int col_offset)
+.. c:function:: void PyErr_SyntaxLocationObject(PyObject *filename, int lineno, int col_offset)
Set file, line, and offset information for the current exception. If the
current exception is not a :exc:`SyntaxError`, then it sets additional
attributes, which make the exception printing subsystem think the exception
- is a :exc:`SyntaxError`. *filename* is decoded from the filesystem encoding
- (:func:`sys.getfilesystemencoding`).
+ is a :exc:`SyntaxError`.
- .. versionadded:: 3.2
+.. versionadded:: 3.3
+
+
+.. c:function:: void PyErr_SyntaxLocationEx(char *filename, int lineno, int col_offset)
+
+ Like :c:func:`PyErr_SyntaxLocationObject`, but *filename* is a byte string
+ decoded from the filesystem encoding (:func:`sys.getfilesystemencoding`).
+
+.. versionadded:: 3.2
.. c:function:: void PyErr_SyntaxLocation(char *filename, int lineno)
- Like :c:func:`PyErr_SyntaxLocationExc`, but the col_offset parameter is
+ Like :c:func:`PyErr_SyntaxLocationEx`, but the col_offset parameter is
omitted.
@@ -355,7 +362,7 @@ in various ways. There is a separate er
documentation. There is no C API for warning control.
-.. c:function:: int PyErr_WarnExplicit(PyObject *category, const char *message, const char *filename, int lineno, const char *module, PyObject *registry)
+.. c:function:: int PyErr_WarnExplicitObject(PyObject *category, PyObject *message, PyObject *filename, int lineno, PyObject *module, PyObject *registry)
Issue a warning message with explicit control over all warning attributes. This
is a straightforward wrapper around the Python function
@@ -365,6 +372,15 @@ in various ways. There is a separate er
*filename* is decoded from the filesystem encoding
(:func:`sys.getfilesystemencoding`).
+ .. versionadded:: 3.3
+
+
+.. c:function:: int PyErr_WarnExplicit(PyObject *category, const char *message, const char *filename, int lineno, const char *module, PyObject *registry)
+
+ Similar to :c:func:`PyErr_WarnExplicitObject` except that *message* and
+ *module* are UTF-8 encoded strings, and *filename* is decoded from the
+ filesystem encoding (:func:`sys.getfilesystemencoding`).
+
.. c:function:: int PyErr_WarnFormat(PyObject *category, Py_ssize_t stack_level, const char *format, ...)
« no previous file with comments | « no previous file | Include/ast.h » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+