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

Side by Side Diff: Objects/exceptions.c

Issue 3871: cross and native build of python for mingw32 with distutils
Patch Set: Created 7 years, 2 months ago
Left:
Right:
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 unified diff | Download patch
« no previous file with comments | « Modules/_winapi.c ('k') | PC/getpathp.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * New exceptions.c written in Iceland by Richard Jones and Georg Brandl. 2 * New exceptions.c written in Iceland by Richard Jones and Georg Brandl.
3 * 3 *
4 * Thanks go to Tim Peters and Michael Hudson for debugging. 4 * Thanks go to Tim Peters and Michael Hudson for debugging.
5 */ 5 */
6 6
7 #define PY_SSIZE_T_CLEAN 7 #define PY_SSIZE_T_CLEAN
8 #include <Python.h> 8 #include <Python.h>
9 #include "structmember.h" 9 #include "structmember.h"
10 #include "osdefs.h" 10 #include "osdefs.h"
(...skipping 2309 matching lines...) Expand 10 before | Expand all | Expand 10 after
2320 2320
2321 #define ADD_ERRNO(TYPE, CODE) { \ 2321 #define ADD_ERRNO(TYPE, CODE) { \
2322 PyObject *_code = PyLong_FromLong(CODE); \ 2322 PyObject *_code = PyLong_FromLong(CODE); \
2323 assert(_PyObject_RealIsSubclass(PyExc_ ## TYPE, PyExc_OSError)); \ 2323 assert(_PyObject_RealIsSubclass(PyExc_ ## TYPE, PyExc_OSError)); \
2324 if (!_code || PyDict_SetItem(errnomap, _code, PyExc_ ## TYPE)) \ 2324 if (!_code || PyDict_SetItem(errnomap, _code, PyExc_ ## TYPE)) \
2325 Py_FatalError("errmap insertion problem."); \ 2325 Py_FatalError("errmap insertion problem."); \
2326 Py_DECREF(_code); \ 2326 Py_DECREF(_code); \
2327 } 2327 }
2328 2328
2329 #ifdef MS_WINDOWS 2329 #ifdef MS_WINDOWS
2330 #include <Winsock2.h> 2330 #include <winsock2.h>
2331 /* The following constants were added to errno.h in VS2010 but have 2331 /* The following constants were added to errno.h in VS2010 but have
2332 preferred WSA equivalents. */ 2332 preferred WSA equivalents. */
2333 #undef EADDRINUSE 2333 #undef EADDRINUSE
2334 #undef EADDRNOTAVAIL 2334 #undef EADDRNOTAVAIL
2335 #undef EAFNOSUPPORT 2335 #undef EAFNOSUPPORT
2336 #undef EALREADY 2336 #undef EALREADY
2337 #undef ECONNABORTED 2337 #undef ECONNABORTED
2338 #undef ECONNREFUSED 2338 #undef ECONNREFUSED
2339 #undef ECONNRESET 2339 #undef ECONNRESET
2340 #undef EDESTADDRREQ 2340 #undef EDESTADDRREQ
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
2584 } 2584 }
2585 } 2585 }
2586 2586
2587 void 2587 void
2588 _PyExc_Fini(void) 2588 _PyExc_Fini(void)
2589 { 2589 {
2590 Py_CLEAR(PyExc_RecursionErrorInst); 2590 Py_CLEAR(PyExc_RecursionErrorInst);
2591 free_preallocated_memerrors(); 2591 free_preallocated_memerrors();
2592 Py_CLEAR(errnomap); 2592 Py_CLEAR(errnomap);
2593 } 2593 }
OLDNEW
« no previous file with comments | « Modules/_winapi.c ('k') | PC/getpathp.c » ('j') | no next file with comments »

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