Mercurial > cpython-lru_cache-weakref
annotate Include/warnings.h @ 79675:c0a2294de787 2.7
Issue #16199: Backport 2to3 typo fix from 3.2.
| author | Chris Jerdonek <chris.jerdonek@gmail.com> |
|---|---|
| date | Thu, 11 Oct 2012 16:15:46 -0700 |
| parents | f61b6c31001c |
| children |
| rev | line source |
|---|---|
|
46414
840064802952
Re-implement the 'warnings' module in C. This allows for usage of the
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
1 #ifndef Py_WARNINGS_H |
|
840064802952
Re-implement the 'warnings' module in C. This allows for usage of the
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
2 #define Py_WARNINGS_H |
|
840064802952
Re-implement the 'warnings' module in C. This allows for usage of the
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
3 #ifdef __cplusplus |
|
840064802952
Re-implement the 'warnings' module in C. This allows for usage of the
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
4 extern "C" { |
|
840064802952
Re-implement the 'warnings' module in C. This allows for usage of the
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
5 #endif |
|
840064802952
Re-implement the 'warnings' module in C. This allows for usage of the
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
6 |
|
840064802952
Re-implement the 'warnings' module in C. This allows for usage of the
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
7 PyAPI_FUNC(void) _PyWarnings_Init(void); |
|
840064802952
Re-implement the 'warnings' module in C. This allows for usage of the
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
8 |
|
840064802952
Re-implement the 'warnings' module in C. This allows for usage of the
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
9 PyAPI_FUNC(int) PyErr_WarnEx(PyObject *, const char *, Py_ssize_t); |
|
840064802952
Re-implement the 'warnings' module in C. This allows for usage of the
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
10 PyAPI_FUNC(int) PyErr_WarnExplicit(PyObject *, const char *, const char *, int, |
|
840064802952
Re-implement the 'warnings' module in C. This allows for usage of the
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
11 const char *, PyObject *); |
|
47321
fcd456ae515b
turn PyErr_WarnPy3k into a macro
Benjamin Peterson <benjamin@python.org>
parents:
46572
diff
changeset
|
12 |
| 47334 | 13 #define PyErr_WarnPy3k(msg, stacklevel) \ |
| 14 (Py_Py3kWarningFlag ? PyErr_WarnEx(PyExc_DeprecationWarning, msg, stacklevel) : 0) | |
|
46414
840064802952
Re-implement the 'warnings' module in C. This allows for usage of the
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
15 |
|
840064802952
Re-implement the 'warnings' module in C. This allows for usage of the
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
16 /* DEPRECATED: Use PyErr_WarnEx() instead. */ |
|
840064802952
Re-implement the 'warnings' module in C. This allows for usage of the
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
17 #define PyErr_Warn(category, msg) PyErr_WarnEx(category, msg, 1) |
|
840064802952
Re-implement the 'warnings' module in C. This allows for usage of the
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
18 |
|
840064802952
Re-implement the 'warnings' module in C. This allows for usage of the
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
19 #ifdef __cplusplus |
|
840064802952
Re-implement the 'warnings' module in C. This allows for usage of the
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
20 } |
|
840064802952
Re-implement the 'warnings' module in C. This allows for usage of the
Brett Cannon <bcannon@gmail.com>
parents:
diff
changeset
|
21 #endif |
|
46427
7a5a580ba6ea
Fix compiler warning Include/warnings.h:19:28: warning: no newline at end of file
Christian Heimes <christian@cheimes.de>
parents:
46414
diff
changeset
|
22 #endif /* !Py_WARNINGS_H */ |
|
7a5a580ba6ea
Fix compiler warning Include/warnings.h:19:28: warning: no newline at end of file
Christian Heimes <christian@cheimes.de>
parents:
46414
diff
changeset
|
23 |
