[Python-Dev] Change definition of Py_END_ALLOW_THREADS?
Tim Peters
tim.one@comcast.net
Thu, 13 Feb 2003 17:57:09 -0500
[Gerald S. Williams]
> ...
> I've been thinking about a related use for __cplusplus: in
> C++ (or C99 for that matter), the extra scope declaration in
> Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS isn't needed. I
> wonder if it would be worth removing the braces from those
> macros when possible.
-1. Having to live with two definition points for these macros is pain
enough already.
> It would be just a matter of principle, I guess--putting braces in macros
> like that is generally frowned upon in polite company. ;-)
Pragmatic company likes it: the braces make it very likely you'll get
cascades of baffling compile-time errors if you don't use the BEGIN/END
macros in matched pairs. That's better than cascades of baffling runtime
errors.