[Python-checkins] python/dist/src/Include boolobject.h, 1.6,
1.7 object.h, 2.123, 2.124
bcannon at users.sourceforge.net
bcannon at users.sourceforge.net
Sun Oct 19 18:58:13 EDT 2003
- Previous message: [Python-checkins] python/dist/src/Misc NEWS,1.872,1.873
- Next message: [Python-checkins] python/dist/src/Modules _ssl.c, 1.13,
1.14 datetimemodule.c, 1.68, 1.69 main.c, 1.78, 1.79 md5c.c,
2.7, 2.8 posixmodule.c, 2.305, 2.306 pypcre.c, 2.25,
2.26 socketmodule.c, 1.276, 1.277
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Include
In directory sc8-pr-cvs1:/tmp/cvs-serv5296/Include
Modified Files:
boolobject.h object.h
Log Message:
Modify the Py_RETURN_* macros to be of the form ``do {...} while (0)`` in order
to handle situations like ``if (foo) Py_RETURN_NONE else ...``.
Index: boolobject.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/boolobject.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** boolobject.h 19 Oct 2003 21:31:43 -0000 1.6
--- boolobject.h 19 Oct 2003 22:58:10 -0000 1.7
***************
*** 25,30 ****
/* Macros for returning Py_True or Py_False, respectively */
! #define Py_RETURN_TRUE {Py_INCREF(Py_True); return Py_True;}
! #define Py_RETURN_FALSE {Py_INCREF(Py_False); return Py_False;}
/* Function to return a bool from a C long */
--- 25,30 ----
/* Macros for returning Py_True or Py_False, respectively */
! #define Py_RETURN_TRUE do {Py_INCREF(Py_True); return Py_True;} while (0)
! #define Py_RETURN_FALSE do {Py_INCREF(Py_False); return Py_False;} while (0)
/* Function to return a bool from a C long */
Index: object.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/object.h,v
retrieving revision 2.123
retrieving revision 2.124
diff -C2 -d -r2.123 -r2.124
*** object.h 19 Oct 2003 21:31:43 -0000 2.123
--- object.h 19 Oct 2003 22:58:11 -0000 2.124
***************
*** 635,639 ****
/* Macro for returning Py_None from a function */
! #define Py_RETURN_NONE {Py_INCREF(Py_None); return Py_None;}
/*
--- 635,639 ----
/* Macro for returning Py_None from a function */
! #define Py_RETURN_NONE do {Py_INCREF(Py_None); return Py_None;} while (0)
/*
- Previous message: [Python-checkins] python/dist/src/Misc NEWS,1.872,1.873
- Next message: [Python-checkins] python/dist/src/Modules _ssl.c, 1.13,
1.14 datetimemodule.c, 1.68, 1.69 main.c, 1.78, 1.79 md5c.c,
2.7, 2.8 posixmodule.c, 2.305, 2.306 pypcre.c, 2.25,
2.26 socketmodule.c, 1.276, 1.277
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Python-checkins
mailing list