comparison Python/errors.c @ 37879:f731859e9b3b

Merge p3yk branch with the trunk up to revision 45595. This breaks a fair number of tests, all because of the codecs/_multibytecodecs issue described here (it's not a Py3K issue, just something Py3K discovers): http://mail.python.org/pipermail/python-dev/2006-April/064051.html Hye-Shik Chang promised to look for a fix, so no need to fix it here. The tests that are expected to break are: test_codecencodings_cn test_codecencodings_hk test_codecencodings_jp test_codecencodings_kr test_codecencodings_tw test_codecs test_multibytecodec This merge fixes an actual test failure (test_weakref) in this branch, though, so I believe merging is the right thing to do anyway.
author Thomas Wouters <thomas@python.org>
date Fri, 21 Apr 2006 10:40:58 +0000
parents a47117fa3ca8
children 29ae5e0fc348
comparison
equal deleted inserted replaced
37877:6a45f26ea619 37879:f731859e9b3b
13 #include "windows.h" 13 #include "windows.h"
14 #include "winbase.h" 14 #include "winbase.h"
15 #endif 15 #endif
16 16
17 #include <ctype.h> 17 #include <ctype.h>
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
18 23
19 void 24 void
20 PyErr_Restore(PyObject *type, PyObject *value, PyObject *traceback) 25 PyErr_Restore(PyObject *type, PyObject *value, PyObject *traceback)
21 { 26 {
22 PyThreadState *tstate = PyThreadState_GET(); 27 PyThreadState *tstate = PyThreadState_GET();
607 PyFile_WriteString(className, f); 612 PyFile_WriteString(className, f);
608 if (v && v != Py_None) { 613 if (v && v != Py_None) {
609 PyFile_WriteString(": ", f); 614 PyFile_WriteString(": ", f);
610 PyFile_WriteObject(v, f, 0); 615 PyFile_WriteObject(v, f, 0);
611 } 616 }
617 Py_XDECREF(moduleName);
612 } 618 }
613 PyFile_WriteString(" in ", f); 619 PyFile_WriteString(" in ", f);
614 PyFile_WriteObject(obj, f, 0); 620 PyFile_WriteObject(obj, f, 0);
615 PyFile_WriteString(" ignored\n", f); 621 PyFile_WriteString(" ignored\n", f);
616 PyErr_Clear(); /* Just in case */ 622 PyErr_Clear(); /* Just in case */
794 p++; 800 p++;
795 return PyString_FromString(p); 801 return PyString_FromString(p);
796 } 802 }
797 return NULL; 803 return NULL;
798 } 804 }
805
806 #ifdef __cplusplus
807 }
808 #endif
809