summaryrefslogtreecommitdiffstats
path: root/Include/boolobject.h
Commit message (Collapse)AuthorAgeFilesLines
* gh-87347: Add parenthesis around PyXXX_Check() arguments (#92815)Victor Stinner2022-06-161-1/+1
|
* gh-91320: Fix more old-style cast warnings in C++ (#93285)Victor Stinner2022-06-021-2/+2
| | | | Use _PyObject_CAST() in the public C API to fix C++ compiler warnings: "use of old-style cast" (clang -Wold-style-cast).
* bpo-45459: C API uses type names rather than structure names (GH-31528)Victor Stinner2022-02-241-2/+2
| | | | Thanks to the new pytypedefs.h, it becomes to use type names like PyObject rather like structure names like "struct _object".
* bpo-43795: PEP-652: Simplify headers for easier static analysis (GH-25483)Petr Viktorin2021-04-231-1/+2
| | | | | | | | | | | | | | | | | | | | As part of the PEP-652 implementation, I'll tighten the CI check for functions/data defined with `Py_LIMITED_API`. Discussion in https://discuss.python.org/t/pep-652-maintaining-the-stable-abi/6986 suggests that parsing C headers is OK (though personally I'd rather generate it...), but writing a full C parser is a monumental task and adding an existing one as a dependency brings too many vendoring/bootstraping issues. So, for the check I'll use a "simple" regex on preprocessor output, and adapt the few trivial places where the regex won't work. - Keep declarations in the limited API to one item per line - Make it possible to override `_Py_NO_RETURN`, so the annotation can be removed from preprocessor output. https://bugs.python.org/issue43795
* bpo-43753: Add Py_Is() and Py_IsNone() functions (GH-25227)Victor Stinner2021-04-101-0/+8
| | | | | | | Add the Py_Is(x, y) function to test if the 'x' object is the 'y' object, the same as "x is y" in Python. Add also the Py_IsNone(), Py_IsTrue(), Py_IsFalse() functions to test if an object is, respectively, the None singleton, the True singleton or the False singleton.
* bpo-42262: Add Py_NewRef() and Py_XNewRef() (GH-23152)Victor Stinner2020-11-051-2/+2
| | | | Added Py_NewRef() and Py_XNewRef() functions to increment the reference count of an object and return the object.
* bpo-39573: Add Py_IS_TYPE() function (GH-18488)Dong-hee Na2020-02-131-1/+1
| | | Co-Author: Neil Schemenauer <nas-github@arctrix.com>
* #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT.Christian Heimes2007-12-191-1/+1
|
* Merged revisions 56467-56482 via svnmerge fromMartin v. Löwis2007-07-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/p3yk ................ r56477 | martin.v.loewis | 2007-07-21 09:04:38 +0200 (Sa, 21 Jul 2007) | 11 lines Merged revisions 56466-56476 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r56476 | martin.v.loewis | 2007-07-21 08:55:02 +0200 (Sa, 21 Jul 2007) | 4 lines PEP 3123: Provide forward compatibility with Python 3.0, while keeping backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT. ........ ................ r56478 | martin.v.loewis | 2007-07-21 09:47:23 +0200 (Sa, 21 Jul 2007) | 2 lines PEP 3123: Use proper C inheritance for PyObject. ................ r56479 | martin.v.loewis | 2007-07-21 10:06:55 +0200 (Sa, 21 Jul 2007) | 3 lines Add longintrepr.h to Python.h, so that the compiler can see that PyFalse is really some kind of PyObject*. ................ r56480 | martin.v.loewis | 2007-07-21 10:47:18 +0200 (Sa, 21 Jul 2007) | 2 lines Qualify SHIFT, MASK, BASE. ................ r56482 | martin.v.loewis | 2007-07-21 19:10:57 +0200 (Sa, 21 Jul 2007) | 2 lines Correctly refer to _ob_next. ................
* Merged the int/long unification branch, by very crude means (sorry Thomas!).Guido van Rossum2007-01-141-4/+2
| | | | | | | | | | I banged on the code (beyond what's in that branch) to make fewer tests fail; the only tests that fail now are: test_descr -- can't pickle ints?! test_pickletools -- ??? test_socket -- See python.org/sf/1619659 test_sqlite -- ??? I'll deal with those later.
* SF bug 994255: Py_RETURN_NONE causes too much warningsTim Peters2004-07-221-2/+2
| | | | | | | | | | 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!).
* Modify the Py_RETURN_* macros to be of the form ``do {...} while (0)`` in orderBrett Cannon2003-10-191-2/+2
| | | | to handle situations like ``if (foo) Py_RETURN_NONE else ...``.
* Modified the Py_RETURN_* macros by having the statements surrounded by {} inBrett Cannon2003-10-191-2/+2
| | | | | order to prevent any unexpected surprises from someone using them in a conditional without using curly braces (e.g., ``if (foo) Py_RETURN_TRUE``.
* Defined macros Py_RETURN_(TRUE|FALSE|NONE) as helper functions for returningBrett Cannon2003-10-191-0/+4
| | | | the specified value. All three Py_INCREF the singleton and then return it.
* Excise DL_EXPORT from Include.Mark Hammond2002-08-121-3/+3
| | | | Thanks to Skip Montanaro and Kalle Svensson for the patches.
* Patch #551008: DL_IMPORT PyBool_FromLong.Martin v. Löwis2002-05-021-1/+1
|
* Add standard header preamble and footer, a-la intobject.h. Main purpose is ↵Mark Hammond2002-04-061-0/+12
| | | | extern "C" for C++ programs.
* Oops. Here are the new files. My apologies.Guido van Rossum2002-04-031-0/+20