- 17 Eki, 2001 26 kayıt (commit)
-
-
Skip Montanaro yazdı
closes patch 470254
-
Barry Warsaw yazdı
test_no_semis_header_splitter(): This actually should still split. test_no_split_long_header(): An example of an unsplittable line. test_no_semis_header_splitter(): Test for SF bug # 471918, Generator splitting long headers.
-
Barry Warsaw yazdı
_split_header(): Split on folding whitespace if the attempt to split on semi-colons failed. _split_header(): Patch by Matthew Cowles for fixing SF bug # 471918, Generator splitting long headers.
-
Guido van Rossum yazdı
PyType_HasFeature(t, Py_TPFLAGS_HAVE_CLASS).
-
Guido van Rossum yazdı
ValueError on too-large inputs.
-
Guido van Rossum yazdı
and fixup_slot_dispatchers() always select the proper slot dispatcher. This affects slot_sq_item(), slot_tp_getattro(), and slot_tp_getattr_hook().
-
Jeremy Hylton yazdı
-
Jeremy Hylton yazdı
-
Jeremy Hylton yazdı
-
Jeremy Hylton yazdı
There are now no known cases where the compiler package computes a stack depth lower than the one computed by the builtin compiler. (To achieve this state, we had to fix bugs in both compilers :-). The chief change is to do the depth calculations with respect to basic blocks. The stack effect of block is calculated. Then the flow graph is traversed using breadth-first search to find the max weight path through the graph. Had to fix the StackDepthTracker to calculate the right info for several opcodes: LOAD_ATTR, CALL_FUNCTION (and friends), MAKE_CLOSURE, and DUP_TOPX. XXX Still need to handle free variables in MAKE_CLOSURE. XXX There are still a lot of places where the computed stack depth is larger than for the builtin compiler. These won't cause the interpreter to overflow the frame, but they waste space.
-
Jeremy Hylton yazdı
-
Jeremy Hylton yazdı
-
Jeremy Hylton yazdı
-
Jeremy Hylton yazdı
Also minor tweaks to internal routines. Use PyCF_MASK instead of explicit list of flags. For the MAKE_CLOSURE opcode, the number of items popped off the stack depends on both the oparg and the number of free variables for the code object. Fix the code so it accounts for the free variables. In com_classdef(), record an extra pop to account for the STORE call after the BUILD_CLASS. Get rid of some commented out debugging code in com_push() and com_pop(). Factor string resize logic into helper routine com_check_size(). In com_addbyte(), remove redudant if statement after assert. (They test the same condition.) In several routines, use string macros instead of string functions.
-
Jeremy Hylton yazdı
-
Guido van Rossum yazdı
d_type before calling the wrapped function. fixup_slot_dispatchers(): fix indentation.
-
Guido van Rossum yazdı
- replace some log_error() calls with log_message() - flush self.rfile before forking too (hope this works on Windows)
-
Guido van Rossum yazdı
Add --install-scripts=$(BINDIR) argument to "setup.py install" invocation.
-
Guido van Rossum yazdı
-
Tim Peters yazdı
line fits in reasonable screen width.
-
Tim Peters yazdı
-
Tim Peters yazdı
Made the presence/absence of a semicolon after macros consistent.
-
Tim Peters yazdı
removed the tricks). Changed the ENTER/LEAVE_ZLIB macros so as not to create a new block (a new block is neither necessary nor helpful).
-
Fred Drake yazdı
-
Fred Drake yazdı
-
Guido van Rossum yazdı
-
- 16 Eki, 2001 14 kayıt (commit)
-
-
Jeremy Hylton yazdı
Apparently this patch (rev 2.41) replaced all the good old "s#" formats in PyArg_ParseTuple() with "S". Then it did PyString_FromStringAndSize() to get back the values setup by the "s#" format. It also incref'd and decref'd the string obtained by "S" even though the argument tuple had a reference to it. Replace PyString_AsString() calls with PyString_AS_STRING(). A good rule of thumb -- if you never check the return value of PyString_AsString() to see if it's NULL, you ought to be using the macro <wink>.
-
Jeremy Hylton yazdı
Many functions used a local variable called return_error, which was initialized to zero. If an error occurred, it was set to true. Most of the code paths checked were only executed if return_error was false. goto is clearer. The code also seemed to be written under the curious assumption that calling Py_DECREF() on a local variable would assign the variable to NULL. As a result, more of the error-exit code paths returned an object that had a reference count of zero instead of just returning NULL. Fixed the code to explicitly assign NULL after the DECREF. A bit more reformatting, but not much. XXX Need a much better test suite for zlib, since it the current tests don't exercise any of this broken code.
-
Tim Peters yazdı
TeX-ified its docstring.
-
Jeremy Hylton yazdı
-
Jeremy Hylton yazdı
It sets a ZlibError exception, using the msg from the z_stream pointer if one is available.
-
Guido van Rossum yazdı
passed to _beginthread().
-
Guido van Rossum yazdı
-
Guido van Rossum yazdı
masks any exception, not just AttributeError. Fix this.
-
Jeremy Hylton yazdı
When PyString_FromStringAndSize() and _PyString_Resize() fail, they set an exception. There's no need to set a new exception.
-
Jeremy Hylton yazdı
Consistently indent 4 spaces. Use whitespace around operators. Put braces in the right places.
-
Guido van Rossum yazdı
This changes Pythread_start_thread() to return the thread ID, or -1 for an error. (It's technically an incompatible API change, but I doubt anyone calls it.)
-
Jeremy Hylton yazdı
-
Jeremy Hylton yazdı
Mostly by Toby Dickenson and Titus Brown. Add an optional argument to a decompression object's decompress() method. The argument specifies the maximum length of the return value. If the uncompressed data exceeds this length, the excess data is stored as the unconsumed_tail attribute. (Not to be confused with unused_data, which is a separate issue.) Difference from SF patch: Default value for unconsumed_tail is "" rather than None. It's simpler if the attribute is always a string.
-
Guido van Rossum yazdı
suggested in SF patch #424475. Also document exception return.
-