Tim Peters
5980ff2d92
SF bug 994255: Py_RETURN_NONE causes too much warnings
...
Rewrote Py_RETURN_{NONE, TRUE, FALSE} to expand to comma expressions
rather than "do {} while(0)" thingies. The OP complained because he
likes using MS /W4 sometimes, and then all his uses of these things
generate nuisance warnings about testing a constant expression (in
the "while(0)" part). Comma expressions don't have this problem
(although it's a lucky accident that comma expressions suffice for these
macros!).
2004-07-22 01:46:43 +00:00
Brett Cannon
4b17e3993b
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 ...``.
2003-10-19 22:58:11 +00:00
Brett Cannon
26b3a7b82c
Modified the Py_RETURN_* macros by having the statements surrounded by {} in
...
order to prevent any unexpected surprises from someone using them in a
conditional without using curly braces (e.g., ``if (foo) Py_RETURN_TRUE``.
2003-10-19 21:31:43 +00:00
Brett Cannon
d05235ec49
Defined macros Py_RETURN_(TRUE|FALSE|NONE) as helper functions for returning
...
the specified value. All three Py_INCREF the singleton and then return it.
2003-10-19 21:19:40 +00:00
Mark Hammond
91a681debf
Excise DL_EXPORT from Include.
...
Thanks to Skip Montanaro and Kalle Svensson for the patches.
2002-08-12 07:21:58 +00:00
Martin v. Löwis
76da0c3b71
Patch #551008 : DL_IMPORT PyBool_FromLong.
2002-05-02 20:23:27 +00:00
Mark Hammond
303d05d317
Add standard header preamble and footer, a-la intobject.h. Main purpose is extern "C" for C++ programs.
2002-04-06 03:58:41 +00:00
Guido van Rossum
5f8203679d
Oops. Here are the new files. My apologies.
2002-04-03 23:01:45 +00:00