[Python-checkins] python/dist/src/Include pyport.h,2.54,2.55

nnorwitz@users.sourceforge.net nnorwitz@users.sourceforge.net
2002年12月19日 07:12:29 -0800


Update of /cvsroot/python/python/dist/src/Include
In directory sc8-pr-cvs1:/tmp/cvs-serv27703/Include
Modified Files:
	pyport.h 
Log Message:
Provide mechanism to deprecate functions, types, and struct members.
It would be nice to support other compilers besides gcc.
Index: pyport.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v
retrieving revision 2.54
retrieving revision 2.55
diff -C2 -d -r2.54 -r2.55
*** pyport.h	15 Sep 2002 14:09:35 -0000	2.54
--- pyport.h	19 Dec 2002 15:12:26 -0000	2.55
***************
*** 311,314 ****
--- 311,327 ----
 	} while(0)
 
+ /* Py_DEPRECATED(version)
+ * Declare a macro or function deprecated.
+ * Usage:
+ * extern int old_var Py_DEPRECATED(2.3);
+ * typedef int T1 Py_DEPRECATED(2.4);
+ * extern int x() Py_DEPRECATED(2.5);
+ */
+ #if defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)
+ #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
+ #else
+ #define Py_DEPRECATED(VERSION_UNUSED) 
+ #endif
+ 
 /**************************************************************************
 Prototypes that are missing from the standard include files on some systems

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