summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* Make the indentation consistently use tabs instead of using spaces justFred Drake2000-12-201-3/+3
| | | | in one place.
* Patch #102940: use only printable Unicode chars in reportingAndrew M. Kuchling2000-12-191-1/+2
| | | | | incorrect % characters; characters outside the printable range are replaced with '?'
* Patch #102868 from cgw: fix memory leak when an EOF is encounteredAndrew M. Kuchling2000-12-191-0/+3
| | | | using GNU libc's getline()
* Fix off-by-one error in split_substring(). Fixes SF bug #122162.Guido van Rossum2000-12-191-1/+1
|
* [ Patch #102852 ] Make % error a bit more informative by indicates theAndrew M. Kuchling2000-12-152-4/+6
| | | | index at which an unknown %-escape was found
* Test for NULL returned from PyObject_NEW().Guido van Rossum2000-12-141-0/+3
|
* Test for NULL returned from PyObject_NEW().Guido van Rossum2000-12-141-0/+3
|
* Add long-overdue docstrings to dict methods.Tim Peters2000-12-131-11/+53
|
* Use METH_VARARGS instead of "1" in list method table.Tim Peters2000-12-131-9/+9
|
* Typo repair in comments. Fell for GregS's .popitem() poke.Tim Peters2000-12-131-2/+6
|
* Bring comments up to date (e.g., they still said the table had to beTim Peters2000-12-131-23/+40
| | | | a prime size, which is in fact never true anymore ...).
* Add popitem() -- SF patch #102733.Guido van Rossum2000-12-121-0/+53
|
* Jeffrey D. Collins <tokeneater@users.sourceforge.net>:Fred Drake2000-12-061-3/+3
| | | | | | Fix type of the self parameter to some string object methods. This closes patch #102670.
* Backing out my changes.Moshe Zadka2000-11-301-72/+0
| | | | Improved version coming soon to a Source Forge near you!
* Only use getline() when compiling using glibcAndrew M. Kuchling2000-11-301-1/+1
|
* Added .first{item,value,key}() to dictionaries.Moshe Zadka2000-11-301-0/+72
| | | | | Complete with docos and tests. OKed by Guido.
* Fox for SF bug #123859: %[duxXo] long formats inconsistent.Tim Peters2000-11-302-7/+2
|
* Patch #102469: Use glibc's getline() extension when reading unbounded linesAndrew M. Kuchling2000-11-291-3/+30
|
* Update dependencies per /F.Guido van Rossum2000-11-281-1/+1
|
* SF patch #102548, fix for bug #121013, by mwh@users.sourceforge.net.Guido van Rossum2000-11-271-1/+1
| | | | Fixes a typo that caused "".join(u"this is a test") to dump core.
* Added _HAVE_BSDI and __APPLE__ to the list of platforms that require aGuido van Rossum2000-11-131-1/+1
| | | | | hack for TELL64()... Sounds like there's something else going on really. Does anybody have a clue I can buy?
* Fixed support for containment test when a negative step is used; thisFred Drake2000-11-081-8/+34
| | | | | | | *really* closes bug #121965. Added three attributes to the xrange object: start, stop, and step. These are the same as for the slice objects.
* In the containment test, get the boundary condition right. ">" was usedFred Drake2000-11-081-2/+2
| | | | | | where ">=" should have been. This closes bug #121965.
* Added 38,642 missing characters to the Unicode database (first-lastFredrik Lundh2000-11-031-87/+86
| | | | | | | ranges) -- but thanks to the 2.0 compression scheme, this doesn't add a single byte to the resulting binaries (!) Closes bug #117524
* Ka-Ping Yee <ping@lfw.org>:Fred Drake2000-10-248-29/+52
| | | | | | Changes to error messages to increase consistency & clarity. This (mostly) closes SourceForge patch #101839.
* [ Bug #116174 ] using %% in cstrings sometimes fails with unicode paramsFix ↵Marc-André Lemburg2000-10-071-11/+17
| | | | | | | for the bug reported in Bug #116174: "%% %s" % u"abc" failed due to the way string formatting delegated work to the Unicode formatting function.
* Donn Cave <donn@oz.net>:Fred Drake2000-10-061-0/+2
| | | | | | | Fix large file support for BeOS. This closes SourceForge patch #101773. Refer to the patch discussion for information on possible alternate fixes.
* SF bug 115831 and Ping's SF patch 101751, 0.0**-2.0 returns inf rather thanTim Peters2000-10-063-32/+47
| | | | | | | | | | raise ValueError. Checked in the patch as far as it went, but also changed all of ints, longs and floats to raise ZeroDivisionError instead when raising 0 to a negative number. This is what 754-inspired stds require, as the "true result" is an infinity obtained from finite operands, i.e. it's a singularity. Also changed float pow to not be so timid about using its square-and-multiply algorithm. Note that what math.pow does is unrelated to what builtin pow does, and will still vary by platform.
* Simplify _PyTuple_Resize by not using the tuple free list and droppingNeil Schemenauer2000-10-051-86/+24
| | | | | support for the last_is_sticky flag. A few hard to find bugs may be fixed by this patch since the old code was buggy.
* Fix for SF bug #115987: PyInstance_HalfBinOp does not initialize theThomas Wouters2000-10-051-11/+11
| | | | | | result-object-pointer that is passed in, when an exception occurs during coercion. The pointer has to be explicitly initialized in the caller to avoid putting trash on the Python stack.
* Move LONG_BIT from intobject.c to pyport.h. #error if it's already beenTim Peters2000-10-051-8/+0
| | | | | | #define'd to an unreasonable value (several recent gcc systems have misdefined it, causing bogus overflows in integer multiplication). Nuke CHAR_BIT entirely.
* - fix a GC bug caused by malloc() failingNeil Schemenauer2000-10-041-1/+1
|
* _PyUnicode_Fini(): Initialize the local freelist walking variable `u'Barry Warsaw2000-10-031-2/+3
| | | | | | after unicode_empty has been freed, otherwise it might not point to the real start of the unicode_freelist. Final closure for SF bug #110681, Jitterbug PR#398.
* In _PyUnicode_Fini(), decref unicode_empty before tearng down the freeGuido van Rossum2000-10-031-2/+2
| | | | list. Discovered by Barry, fix approved by MAL.
* Rationalize use of limits.h, moving the inclusion to Python.h.Fred Drake2000-09-268-67/+1
| | | | | | | | Add definitions of INT_MAX and LONG_MAX to pyport.h. Remove includes of limits.h and conditional definitions of INT_MAX and LONG_MAX elsewhere. This closes SourceForge patch #101659 and bug #115323.
* - don't set the titlecase flag for uppercase letters (sorry, tim)Fredrik Lundh2000-09-251-40/+40
|
* unicode database compression, step 3:Fredrik Lundh2000-09-251-10021/+72
| | | | | - use unidb compression for the unicodectype module. smaller, faster, and slightly more portable...
* unicode database compression, step 3:Fredrik Lundh2000-09-251-0/+578
| | | | | | | | - use unidb compression for the unicodectype module. smaller, faster, and slightly more portable... (note: this commit doesn't include the unicodectype.c file itself; I'm still waiting for the reviewers...)
* Replace SIGFPE paranoia around strtod and atof. I don't believe theseTim Peters2000-09-251-0/+4
| | | | | fncs are allowed to raise SIGFPE (see the C std), but OK by me if people using --with-fpectl want to pay for checking anyway.
* Fix for SF bug 110624: float literals behave inconsistently.Tim Peters2000-09-231-16/+44
| | | | | | | | | | | | | | | | | | | | | | | | I fixed the specific complaint but left the (many) large issues untouched. See the (very long) bug report discussion for why: http://sourceforge.net/bugs/?func=detailbug&group_id=5470&bug_id=110624 Note that while I left the interface to the undocumented public API function PyFloat_FromString alone, its 2nd argument is useless. From a comment block in the code: RED_FLAG 22-Sep-2000 tim PyFloat_FromString's pend argument is braindead. Prior to this RED_FLAG, 1. If v was a regular string, *pend was set to point to its terminating null byte. That's useless (the caller can find that without any help from this function!). 2. If v was a Unicode string, or an object convertible to a character buffer, *pend was set to point into stack trash (the auto temp vector holding the character buffer). That was downright dangerous. Since we can't change the interface of a public API function, pend is still supported but now *officially* useless: if pend is not NULL, *pend is set to NULL.
* Untested patch by Ty Sarna to make TELL64 work on older NetBSD systems.Guido van Rossum2000-09-211-2/+6
| | | | | According to Justin Pettit, this also works on OpenBSD, so I've added that symbol as well.
* As suggested by Toby Dickenson, setting ob_type to NULL inGuido van Rossum2000-09-211-4/+0
| | | | _Py_Dealloc(), is a bad idea (and always was!). So let's drop it.
* Derived from Martin's SF patch 110609: support unbounded ints in ↵Tim Peters2000-09-212-52/+271
| | | | | | | | | | | | | | | | %d,i,u,x,X,o formats. Note a curious extension to the std C rules: x, X and o formatting can never produce a sign character in C, so the '+' and ' ' flags are meaningless for them. But unbounded ints *can* produce a sign character under these conversions (no fixed- width bitstring is wide enough to hold all negative values in 2's-comp form). So these flags become meaningful in Python when formatting a Python long which is too big to fit in a C long. This required shuffling around existing code, which hacked x and X conversions to death when both the '#' and '0' flags were specified: the hacks weren't strong enough to deal with the simultaneous possibility of the ' ' or '+' flags too, since signs were always meaningless before for x and X conversions. Isomorphic shuffling was required in unicodeobject.c. Also added dozens of non-trivial new unbounded-int test cases to test_format.py.
* This patch adds a new Python C API called PyString_AsStringAndSize()Marc-André Lemburg2000-09-191-7/+63
| | | | | | | | | | | | | which implements the automatic conversion from Unicode to a string object using the default encoding. The new API is then put to use to have eval() and exec accept Unicode objects as code parameter. This closes bugs #110924 and #113890. As side-effect, the traditional C APIs PyString_Size() and PyString_AsString() will also accept Unicode objects as parameters.
* PyObject_SetAttr() and PyObject_GetAttr() now also accept UnicodeMarc-André Lemburg2000-09-181-11/+37
| | | | | | | | | | | | | | | objects for the attribute name. Unicode objects are converted to a string using the default encoding before trying the lookup. Note that previously it was allowed to pass arbitrary objects as attribute name in case the tp_getattro/setattro slots were defined. This patch fixes this by applying an explicit string check first: all uses of these slots expect string objects and do not check for the type resulting in a core dump. The tp_getattro/setattro are still useful as optimization for lookups using interned string objects though. This patch fixes bug #113829.
* Fix for SF bug 110688: Instance deallocation neglected to account forTim Peters2000-09-171-12/+28
| | | | | | | | | | that Py_INCREF boosts global _Py_RefTotal when Py_REF_DEBUG is defined but Py_TRACE_REFS isn't. There are, IMO, way too many preprocessor gimmicks in use for refcount debugging (at least 3 distinct true/false symbols, but not all 8 combos are supported by the code, etc etc), and no coherent documentation of this stuff -- 'twas too painful to track this one down.
* Fixed legit gripe from c.l.py that math.fmod docs aren't confusing enough.Tim Peters2000-09-161-1/+1
| | | | FRED, please check my monkey-see-monkey-do Tex fiddling!
* Don't remove instance objects from the GC container set until we areNeil Schemenauer2000-09-151-2/+1
| | | | they are dead. Fixes bug #113812.
* Correctly cast the return value of realloc.Martin v. Löwis2000-09-151-1/+1
|
* Correctly use realloc return value. Fixes bug #114424.Martin v. Löwis2000-09-151-1/+1
|