summaryrefslogtreecommitdiff
path: root/Objects/boolobject.c
AgeCommit message (Collapse)AuthorLines
2010-05-09Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou-110/+110
svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
2009-02-02Issue #1717: rename tp_compare to tp_reserved. I'll change theMark Dickinson-1/+1
type of tp_compare in a separate commit, for ease of reversion should things go wrong.
2009-01-17Issue #4910, patch 3/3: rename nb_long to nb_reservedMark Dickinson-1/+1
2008-08-30Remove outdated comment. Reviewed by Antoine.Georg Brandl-1/+0
2008-06-11Remove nb_reserved (nb_coerce), nb_hex, and nb_oct from PyNumberMethodsBenjamin Peterson-3/+0
2007-09-21Remove more cruft leftover from nb_coerce. Rename nb_coerce toNeil Schemenauer-1/+1
nb_reserved.
2007-08-07Kill all uses and definitions of tp_print under Objects/. (Others will follow.)Guido van Rossum-10/+1
Finally kill intobject.c, which was #ifdef'ed out a long time ago.
2007-07-21Merged revisions 56467-56482 via svnmerge fromMartin v. Löwis-6/+5
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. ................
2007-05-25Add interning of unicode strings by copying the functionality fromWalter Dörwald-2/+2
stringobject.c. Intern "True" and "False" in bool_repr() again as it was in the 8bit string era.
2007-05-18Add functions PyUnicode_Append() and PyUnicode_AppendAndDel() that mirrorWalter Dörwald-2/+2
PyString_Concat() and PyString_ConcatAndDel() (the name PyUnicode_Concat() was already taken). Change PyObject_Repr() to always return a unicode object. Update all repr implementations to return unicode objects. Add a function PyObject_ReprStr8() that calls PyObject_Repr() and converts the result to an 8bit string. Use PyObject_ReprStr8() where using PyObject_Repr() can't be done straightforward.
2007-01-14Merged the int/long unification branch, by very crude means (sorry Thomas!).Guido van Rossum-22/+21
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.
2006-11-28- patch #1600346 submitted by Tomer FilibaJack Diederich-1/+1
- Renamed nb_nonzero slots to nb_bool - Renamed __nonzero__ methods to __bool__ - update core, lib, docs, and tests to match
2006-07-27Get rid of most of the flags (in tp_flags) that keep track of variousGuido van Rossum-1/+1
variations of the type struct and its attachments. In Py3k, all type structs have to have all fields -- no binary backwards compatibility. Had to change the complex object to a new-style number!
2006-04-21Merge p3yk branch with the trunk up to revision 45595. This breaks a fairThomas Wouters-36/+36
number of tests, all because of the codecs/_multibytecodecs issue described here (it's not a Py3K issue, just something Py3K discovers): http://mail.python.org/pipermail/python-dev/2006-April/064051.html Hye-Shik Chang promised to look for a fix, so no need to fix it here. The tests that are expected to break are: test_codecencodings_cn test_codecencodings_hk test_codecencodings_jp test_codecencodings_kr test_codecencodings_tw test_codecs test_multibytecodec This merge fixes an actual test failure (test_weakref) in this branch, though, so I believe merging is the right thing to do anyway.
2006-03-24Get rid of remnants of integer divisionNeal Norwitz-2/+0
2006-02-27Revert backwards-incompatible const changes.Martin v. Löwis-1/+1
2005-12-10Add const to several API functions that take char *.Jeremy Hylton-1/+1
In C++, it's an error to pass a string literal to a char* function without a const_cast(). Rather than require every C++ extension module to put a cast around string literals, fix the API to state the const-ness. I focused on parts of the API where people usually pass literals: PyArg_ParseTuple() and friends, Py_BuildValue(), PyMethodDef, the type slots, etc. Predictably, there were a large set of functions that needed to be fixed as a result of these changes. The most pervasive change was to make the keyword args list passed to PyArg_ParseTupleAndKewords() to be a const char *kwlist[]. One cast was required as a result of the changes: A type object mallocs the memory for its tp_doc slot and later frees it. PyTypeObject says that tp_doc is const char *; but if the type was created by type_new(), we know it is safe to cast to char *.
2003-04-19- bool() called without arguments now returns False rather thanGuido van Rossum-2/+2
raising an exception. This is consistent with calling the constructors for the other builtin types -- called without argument they all return the false value of that type. (SF patch #724135) Thanks to Alex Martelli.
2002-08-06Make more functions staticNeal Norwitz-2/+2
2002-06-13Patch #568124: Add doc string macros.Martin v. Löwis-2/+2
2002-04-25Clean up the layout of the bool_as_number struct initializer.Guido van Rossum-38/+38
2002-04-04As Neal pointed out, bool_print was an order of magnitude too complex.Guido van Rossum-12/+1
2002-04-03Oops. Here are the new files. My apologies.Guido van Rossum-0/+212