[Python-checkins] CVS: python/dist/src/Include pyport.h,2.4,2.5

Tim Peters python-dev@python.org
2000年7月23日 14:18:11 -0700


Update of /cvsroot/python/python/dist/src/Include
In directory slayer.i.sourceforge.net:/tmp/cvs-serv4368/python/dist/src/Include
Modified Files:
	pyport.h 
Log Message:
Removed all instances of RETSIGTYPE from the source code: signal
handlers "return void", according to ANSI C.
Removed the new Py_RETURN_FROM_SIGNAL_HANDLER macro.
Left RETSIGTYPE in the config stuff, because it's not clear to
me that others aren't relying on it (e.g., extension modules).
Index: pyport.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v
retrieving revision 2.4
retrieving revision 2.5
diff -C2 -r2.4 -r2.5
*** pyport.h	2000年07月23日 19:28:34	2.4
--- pyport.h	2000年07月23日 21:18:08	2.5
***************
*** 24,32 ****
 Used in: Py_ARITHMETIC_RIGHT_SHIFT
 
- RETSIGTYPE
- Meaning: Expands to void or int, depending on what the platform wants
- signal handlers to return. Note that only void is ANSI!
- Used in: Py_RETURN_FROM_SIGNAL_HANDLER
- 
 Py_DEBUG
 Meaning: Extra checks compiled in for debug mode.
--- 24,27 ----
***************
*** 66,81 ****
 */
 #define Py_FORCE_EXPANSION(X) X
- 
- /* Py_RETURN_FROM_SIGNAL_HANDLER
- * The return from a signal handler varies depending on whether RETSIGTYPE
- * is int or void. The macro Py_RETURN_FROM_SIGNAL_HANDLER(VALUE) expands
- * to
- * return VALUE
- * if RETSIGTYPE is int, else to nothing if RETSIGTYPE is void.
- */
- #define int_PySIGRETURN(VALUE) return VALUE
- #define void_PySIGRETURN(VALUE)
- #define Py_RETURN_FROM_SIGNAL_HANDLER(VALUE) \
- Py_FORCE_EXPANSION(RETSIGTYPE) ## _PySIGRETURN(VALUE)
 
 /* Py_SAFE_DOWNCAST(VALUE, WIDE, NARROW)
--- 61,64 ----

AltStyle によって変換されたページ (->オリジナル) /