- 17 Eki, 2001 7 kayıt (commit)
-
-
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 26 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.
-
Tim Peters yazdı
object.c, PyObject_Str: Don't try to optimize anything except exact string objects here; in particular, let str subclasses go thru tp_str, same as non-str objects. This allows overrides of tp_str to take effect. stringobject.c: + string_print (str's tp_print): If the argument isn't an exact string object, get one from PyObject_Str. + string_str (str's tp_str): Make a genuine-string copy of the object if it's of a proper str subclass type. str() applied to a str subclass that doesn't override __str__ ends up here. test_descr.py: New str_of_str_subclass() test.
-
Guido van Rossum yazdı
-
Guido van Rossum yazdı
When an extension imports another extension in its initXXX() function, the variable _Py_PackageContext is prematurely reset to NULL. If the outer extension then calls Py_InitModule(), the extension is installed in sys.modules without its package name. The manifestation of this bug is a "SystemError: _PyImport_FixupExtension: module <package>.<extension> not loaded". To fix this, importdl.c just needs to retain the old value of _Py_PackageContext and restore it after the initXXX() method is called. The attached patch does this. This patch applies to Python 2.1.1 and the current CVS.
-
Guido van Rossum yazdı
size(), parse150(): try int() first, catch OverflowError, fall back to long().
-
Fred Drake yazdı
-
Fred Drake yazdı
-
Jeremy Hylton yazdı
-
Guido van Rossum yazdı
efficient: - recurse down subclasses only once rather than for each affected slot; - short-circuit recursing down subclasses when a subclass has its own definition of the name that caused the update_slot() calls in the first place; - inline collect_ptrs().
-
Jeremy Hylton yazdı
-
Fred Drake yazdı
specific, and updated some of the comments about the profile hook. This closes SF bug #471725.
-
Fred Drake yazdı
Reported by Francesco Trentini.
-
Guido van Rossum yazdı
typo.
-
- 15 Eki, 2001 7 kayıt (commit)
-
-
Tim Peters yazdı
-
Tim Peters yazdı
-
Tim Peters yazdı
-
Fred Drake yazdı
hotshot.stats.load(logfilename) returns a pstats.Stats instance, which is about as compatible as it gets.
-
Fred Drake yazdı
changing an application to collect profile data on one part of the app while still making use of the profiled component, without relying on side effects.
-
Fred Drake yazdı
Added support for saving the names of the functions observed into the profile log. Added support for using the profiler to measure coverage without collecting timing information (which is the slow part). Coverage logs can also be substantially smaller than profiling logs where per-line information is being collected. Updated comments on the log format; corrected record type values in some of the record descriptions.
-
Fred Drake yazdı
Add support for extracting function names from the log file, keeping the extract-names-from-sources support as a fallback.
-