mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Merge branches/pep-0384.
This commit is contained in:
		
							parent
							
								
									c4df784514
								
							
						
					
					
						commit
						4d0d471a80
					
				
					 102 changed files with 2835 additions and 75 deletions
				
			
		|  | @ -6,6 +6,7 @@ extern "C" { | |||
| 
 | ||||
| /* Error objects */ | ||||
| 
 | ||||
| #ifndef Py_LIMITED_API | ||||
| /* PyException_HEAD defines the initial segment of every exception class. */ | ||||
| #define PyException_HEAD PyObject_HEAD PyObject *dict;\ | ||||
|              PyObject *args; PyObject *traceback;\ | ||||
|  | @ -55,6 +56,7 @@ typedef struct { | |||
|     PyObject *winerror; | ||||
| } PyWindowsErrorObject; | ||||
| #endif | ||||
| #endif | ||||
| 
 | ||||
| /* Error handling definitions */ | ||||
| 
 | ||||
|  | @ -68,8 +70,9 @@ PyAPI_FUNC(PyObject *) PyErr_Occurred(void); | |||
| PyAPI_FUNC(void) PyErr_Clear(void); | ||||
| PyAPI_FUNC(void) PyErr_Fetch(PyObject **, PyObject **, PyObject **); | ||||
| PyAPI_FUNC(void) PyErr_Restore(PyObject *, PyObject *, PyObject *); | ||||
| PyAPI_FUNC(void) Py_FatalError(const char *message); | ||||
| 
 | ||||
| #ifdef Py_DEBUG | ||||
| #if defined(Py_DEBUG) || defined(Py_LIMITED_API) | ||||
| #define _PyErr_OCCURRED() PyErr_Occurred() | ||||
| #else | ||||
| #define _PyErr_OCCURRED() (_PyThreadState_Current->curexc_type) | ||||
|  | @ -183,7 +186,7 @@ PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilename( | |||
|     PyObject *exc, | ||||
|     const char *filename   /* decoded from the filesystem encoding */ | ||||
|     ); | ||||
| #ifdef MS_WINDOWS | ||||
| #if defined(MS_WINDOWS) && !defined(Py_LIMITED_API) | ||||
| PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithUnicodeFilename( | ||||
|     PyObject *, const Py_UNICODE *); | ||||
| #endif /* MS_WINDOWS */ | ||||
|  | @ -199,15 +202,20 @@ PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithFilenameObject( | |||
|     int, const char *); | ||||
| PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithFilename( | ||||
|     int, const char *); | ||||
| #ifndef Py_LIMITED_API | ||||
| /* XXX redeclare to use WSTRING */ | ||||
| PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithUnicodeFilename( | ||||
|     int, const Py_UNICODE *); | ||||
| #endif | ||||
| PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErr(int); | ||||
| PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithFilenameObject( | ||||
|     PyObject *,int, PyObject *); | ||||
| PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithFilename( | ||||
|     PyObject *,int, const char *); | ||||
| #ifndef Py_LIMITED_API | ||||
| PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithUnicodeFilename( | ||||
|     PyObject *,int, const Py_UNICODE *); | ||||
| #endif | ||||
| PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErr(PyObject *, int); | ||||
| #endif /* MS_WINDOWS */ | ||||
| 
 | ||||
|  | @ -230,7 +238,9 @@ PyAPI_FUNC(int) PyErr_CheckSignals(void); | |||
| PyAPI_FUNC(void) PyErr_SetInterrupt(void); | ||||
| 
 | ||||
| /* In signalmodule.c */ | ||||
| #ifndef Py_LIMITED_API | ||||
| int PySignal_SetWakeupFd(int fd); | ||||
| #endif | ||||
| 
 | ||||
| /* Support for adding program text to SyntaxErrors */ | ||||
| PyAPI_FUNC(void) PyErr_SyntaxLocation(const char *, int); | ||||
|  | @ -245,12 +255,16 @@ PyAPI_FUNC(PyObject *) PyUnicodeDecodeError_Create( | |||
|     const char *, const char *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *); | ||||
| 
 | ||||
| /* create a UnicodeEncodeError object */ | ||||
| #ifndef Py_LIMITED_API | ||||
| PyAPI_FUNC(PyObject *) PyUnicodeEncodeError_Create( | ||||
|     const char *, const Py_UNICODE *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *); | ||||
| #endif | ||||
| 
 | ||||
| /* create a UnicodeTranslateError object */ | ||||
| #ifndef Py_LIMITED_API | ||||
| PyAPI_FUNC(PyObject *) PyUnicodeTranslateError_Create( | ||||
|     const Py_UNICODE *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *); | ||||
| #endif | ||||
| 
 | ||||
| /* get the encoding attribute */ | ||||
| PyAPI_FUNC(PyObject *) PyUnicodeEncodeError_GetEncoding(PyObject *); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Martin v. Löwis
						Martin v. Löwis