summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* Fix grouping: this is how I intended it, misguided as I was in booleanThomas Wouters2000-08-311-2/+2
| | | | operator associativity.
* Peter Schneider-Kamp <nowonder@nowonder.de>:Fred Drake2000-08-311-7/+3
| | | | | | Remove some of GCC's warning in -Wstrict-prototypes mode. This closes SourceForge patch #101342.
* Removed compiler warning about wanting explicit grouping around &&Fred Drake2000-08-311-4/+6
| | | | | expression next to a || expression; this is a readability-inspired warning from GCC.
* PyOS_CheckStack() returns 1 when failing, not -1.Guido van Rossum2000-08-301-1/+1
|
* Fixed a serious typo.Marc-André Lemburg2000-08-251-1/+1
|
* Fix to bug [ Bug #111860 ] file.writelines() crashes.Marc-André Lemburg2000-08-251-9/+34
| | | | | | | file.writelines() now tries to emulate the behaviour of file.write() as closely as possible. Due to the problems with releasing the interpreter lock the solution isn't exactly optimal, but still better than not supporting the file.write() semantics at all.
* Call PyErr_Clear() to clear the AttributeError raised by GetAttr.Thomas Wouters2000-08-251-0/+1
|
* Support for the in-place operations introduced by augmented assignment. OnlyThomas Wouters2000-08-243-29/+647
| | | | | the list object supports this currently, but other candidates are gladly accepted (like arraymodule and such.)
* Addendum to previous change: now that 'f' is not unconditionallyThomas Wouters2000-08-231-11/+11
| | | | initialized in the 'if (..)', do so manually.
* Add extra check on whether 'tp_as_number' is still non-NULL after coercion,Thomas Wouters2000-08-231-24/+28
| | | | | in the PyNumber_* functions. Also, remove unnecessary tests from PyNumber_Multiply: after BINOP(), neither argument can be an instance.
* Added PyOS_CheckStack call to PyObject_CompareJack Jansen2000-08-221-0/+13
| | | | | Lowered the recursion limit on compares to 60 (one recursion depth can take a whopping 2K of stack space when running test_b1!)
* Added include for limits.hJack Jansen2000-08-222-0/+8
|
* PyUnicode_AsUTF8String(): /F picks up what I missed: the local varBarry Warsaw2000-08-181-2/+0
| | | | `str' is no longer necessary. Gotta turn on -Wall!
* PyUnicode_AsUTF8String(): Don't need to explicitly incref str sinceBarry Warsaw2000-08-181-7/+3
| | | | | PyUnicode_EncodeUTF8() already returns the created object with the proper reference count. This fixes an Insure reported memory leak.
* make_pair(): When comparing the pointers, they must be cast to integerBarry Warsaw2000-08-181-2/+6
| | | | | | types (i.e. Py_uintptr_t, our spelling of C9X's uintptr_t). ANSI specifies that pointer compares other than == and != to non-related structures are undefined. This quiets an Insure portability warning.
* PyFloat_FromString(): Move s_buffer[] up to the top-level functionBarry Warsaw2000-08-181-2/+1
| | | | | | scope. Previously, s_buffer[] was defined inside the PyUnicode_Check() scope, but referred to in the outer scope via assignment to s. This quiets an Insure portability warning.
* PyInstance_DoBinOp(): When comparing the pointers, they must be castBarry Warsaw2000-08-181-1/+4
| | | | | | | to integer types (i.e. Py_uintptr_t, our spelling of C9X's uintptr_t). ANSI specifies that pointer compares other than == and != to non-related structures are undefined. This quiets an Insure portability warning.
* Apply SF patch #101029: call __getitem__ with a proper slice object if thereThomas Wouters2000-08-172-9/+97
| | | | | | | | is no __getslice__ available. Also does the same for C extension types. Includes rudimentary documentation (it could use a cross reference to the section on slice objects, I couldn't figure out how to do that) and a test suite for all Python __hooks__ I could think of, including the new behaviour.
* Insure properly identifies the `interned' dictionary as leaking atBarry Warsaw2000-08-161-0/+12
| | | | | | shutdown time, but CVS log entry for revision 2.45 explains why this is so. Simply include a comment so we don't have to re-figure it out again 5 years from now.
* Updated commentAndrew M. Kuchling2000-08-161-1/+1
|
* Fix for http://sourceforge.net/bugs/?func=detailbug&bug_id=111866&group_id=5470.Tim Peters2000-08-154-100/+74
| | | | | | | | | | | This was a misleading bug -- the true "bug" was that hash(x) gave an error return when x is an infinity. Fixed that. Added new Py_IS_INFINITY macro to pyport.h. Rearranged code to reduce growing duplication in hashing of float and complex numbers, pushing Trent's earlier stab at that to a logical conclusion. Fixed exceedingly rare bug where hashing of floats could return -1 even if there wasn't an error (didn't waste time trying to construct a test case, it was simply obvious from the code that it *could* happen). Improved complex hash so that hash(complex(x, y)) doesn't systematically equal hash(complex(y, x)) anymore.
* Fixed a couple of instances where a 0-length string was beingMarc-André Lemburg2000-08-141-6/+13
| | | | | | | resized after creation. 0-length strings are usually shared and _PyString_Resize() fails on these shared strings. Fixes [ Bug #111667 ] unicode core dump.
* Check for overflow in list object insertion and raise OverflowError.Trent Mick2000-08-131-0/+5
| | | | see: http://www.python.org/pipermail/python-dev/2000-August/014971.html
* Clean up warning from Monterey compiler.Trent Mick2000-08-121-1/+1
| | | | | | Properly end a comment block. It was terminated fine later but by a subsequent block and. It was also in #if 0. This patch is so trivial I can't believe I am talking about it. :)
* Clean up a warning on Win64. The downcast of the strlen size_tTrent Mick2000-08-121-1/+1
| | | | | return value to int is safe here because it previously checked that there will be no overflow.
* Add the current Win64 compiler to the list of those that need theTrent Mick2000-08-121-1/+5
| | | | | huge switch statement broken up. This will probably not be necessary when the Win64 compiler matures.
* Add largefile support for Linux64 and WIn64. Add test_largefile and some minorTrent Mick2000-08-111-37/+145
| | | | | | | | | | change to regrtest.py to allow optional running of test_largefile ('cause it's slow on Win64). This closes patches: http://sourceforge.net/patch/index.php?func=detailpatch&patch_id=100510&group_id=5470 and http://sourceforge.net/patch/index.php?func=detailpatch&patch_id=100511&group_id=5470
* Fix missing decrements of the recursive counter in PyObject_Compare().Vladimir Marangozov2000-08-111-6/+12
| | | | Closes Patch #101065.
* Barry's patch to implement the new setdefault() method.Guido van Rossum2000-08-081-0/+36
|
* Removing UTF-16 aware Unicode comparison code. This kind of compareMarc-André Lemburg2000-08-081-0/+33
| | | | | | | function (together with other locale aware ones) should into a new collation support module. See python-dev for a discussion of this removal. Note: This patch should also be applied to the 1.6 branch.
* Removing warnings found by gcc -WallMoshe Zadka2000-08-042-4/+9
|
* Boost buffer sizes in the absence of snprintf on Windows.Tim Peters2000-08-041-14/+19
| | | | Ensure that # of args to sprintf always matches # of format specifiers.
* snprintf() is not portable, so continue to use sprintf() until a portableFred Drake2000-08-041-8/+6
| | | | snprintf() is available.
* This patch finalizes the move from UTF-8 to a default encoding inMarc-André Lemburg2000-08-031-40/+40
| | | | | | | | | | | | | | | | | | the Python Unicode implementation. The internal buffer used for implementing the buffer protocol is renamed to defenc to make this change visible. It now holds the default encoded version of the Unicode object and is calculated on demand (NULL otherwise). Since the default encoding defaults to ASCII, this will mean that Unicode objects which hold non-ASCII characters will no longer work on C APIs using the "s" or "t" parser markers. C APIs must now explicitly provide Unicode support via the "u", "U" or "es"/"es#" parser markers in order to work with non-ASCII Unicode strings. (Note: this patch will also have to be applied to the 1.6 branch of the CVS tree.)
* Remove the tp_print handler.Fred Drake2000-08-031-31/+27
| | | | | Revise the tp_repr handler to produce a more "minimal" presentation. Make the tolist() method use PyArg_ParseTuple() and provide a docstring.
* Remobe beopen/cnri/cwi copyrights, according to CNRI instructions.Guido van Rossum2000-08-031-10/+0
| | | | | | This doesn't change the copyright status for these files -- just the markings! Doing it on the main branch for these three files for which the HEAD revision was pushed back into 1.6.
* Changing the CNRI copyright notice according to CNRI's instructions.Guido van Rossum2000-08-032-2/+2
| | | | | This is a notice without a date, which apparently is not a claim to copyright but only advice to the reader. IANAL. :-)
* merge Include/my*.h into Include/pyport.hPeter Schneider-Kamp2000-07-316-7/+0
| | | | marked my*.h as obsolete
* Use 'void' directly instead of the ANY #define, now that all code is ANSI C.Thomas Wouters2000-07-252-10/+10
| | | | Leave the actual #define in for API compatibility.
* ANSIfy functions that were hiding inside a macro.Thomas Wouters2000-07-231-1/+1
|
* ANSIfication: remove very-old-varargs code, fix function declarations soThomas Wouters2000-07-221-34/+0
| | | | they include prototypes.
* Miscelaneous ANSIfications. I'm assuming here 'main' should take (int,Thomas Wouters2000-07-222-21/+5
| | | | | char**) and return an int even on PC platforms. If not, please fix PC/utils/makesrc.c ;-P
* Fixed problems with UTF error reporting macros and some formatting bugs.Marc-André Lemburg2000-07-171-45/+64
|
* Restore PyXXX_Length() APIs for binary compatibility.Marc-André Lemburg2000-07-171-0/+24
| | | | | | New code will see the macros and therefore use the PyXXX_Size() APIs instead. By Thomas Wouters.
* gcc is being stupid with if/else constructsGreg Stein2000-07-171-6/+14
| | | | clean out some other warnings
* stop messing around with goto and just write the macro correctly.Greg Stein2000-07-161-7/+6
|
* - change \x to mean "byte" also in unicode literalsFredrik Lundh2000-07-161-3/+5
| | | | (patch #100912)
* Fix fatal compiler (MSVC6) error:Tim Peters2000-07-161-0/+1
| | | | | unicodeobject.c(735) : error C2143: syntax error : missing ';' before '}'
* Fix to a bug found by Florian Weimer:Marc-André Lemburg2000-07-161-1/+2
| | | | | | | | | | | | | | | | The UTF-8 decoder is still buggy (i.e. it doesn't pass Markus Kuhn's stress test), mainly due to the following construct: #define UTF8_ERROR(details) do { \ if (utf8_decoding_error(&s, &p, errors, details)) \ goto onError; \ continue; \ } while (0) (The "continue" statement is supposed to exit from the outer loop, but of course, it doesn't. Indeed, this is a marvelous example of the dangers of the C programming language and especially of the C preprocessor.)
* Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in eitherThomas Wouters2000-07-166-12/+12
| | | | | | | | | | comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;)