[Python-checkins] python/nondist/sandbox/csv _csv.c,1.11,1.12

montanaro@users.sourceforge.net montanaro@users.sourceforge.net
Sun, 02 Feb 2003 18:43:10 -0800


Update of /cvsroot/python/python/nondist/sandbox/csv
In directory sc8-pr-cvs1:/tmp/cvs-serv27527

Modified Files:
	_csv.c 
Log Message:
make it work with Python 2.2


Index: _csv.c
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/csv/_csv.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** _csv.c	2 Feb 2003 12:58:40 -0000	1.11
--- _csv.c	3 Feb 2003 02:43:08 -0000	1.12
***************
*** 17,20 ****
--- 17,41 ----
  #include "structmember.h"
  
+ /* begin 2.2 compatibility macros */
+ #ifndef PyDoc_STRVAR
+ /* Define macros for inline documentation. */
+ #define PyDoc_VAR(name) static char name[]
+ #define PyDoc_STRVAR(name,str) PyDoc_VAR(name) = PyDoc_STR(str)
+ #ifdef WITH_DOC_STRINGS
+ #define PyDoc_STR(str) str
+ #else
+ #define PyDoc_STR(str) ""
+ #endif
+ #endif /* ifndef PyDoc_STRVAR */
+ 
+ #ifndef PyMODINIT_FUNC
+ #	if defined(__cplusplus)
+ #		define PyMODINIT_FUNC extern "C" void
+ #	else /* __cplusplus */
+ #		define PyMODINIT_FUNC void
+ #	endif /* __cplusplus */
+ #endif
+ /* end 2.2 compatibility macros */
+ 
  static PyObject *error_obj;	/* CSV exception */