- 17 Oct, 2001 11 commits
-
-
Guido van Rossum authored
d_type before calling the wrapped function. fixup_slot_dispatchers(): fix indentation.
-
Guido van Rossum authored
- replace some log_error() calls with log_message() - flush self.rfile before forking too (hope this works on Windows)
-
Guido van Rossum authored
Add --install-scripts=$(BINDIR) argument to "setup.py install" invocation.
-
Guido van Rossum authored
-
Tim Peters authored
line fits in reasonable screen width.
-
Tim Peters authored
-
Tim Peters authored
Made the presence/absence of a semicolon after macros consistent.
-
Tim Peters authored
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 authored
-
Fred Drake authored
-
Guido van Rossum authored
-
- 16 Oct, 2001 26 commits
-
-
Jeremy Hylton authored
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 authored
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 authored
TeX-ified its docstring.
-
Jeremy Hylton authored
-
Jeremy Hylton authored
It sets a ZlibError exception, using the msg from the z_stream pointer if one is available.
-
Guido van Rossum authored
passed to _beginthread().
-
Guido van Rossum authored
-
Guido van Rossum authored
masks any exception, not just AttributeError. Fix this.
-
Jeremy Hylton authored
When PyString_FromStringAndSize() and _PyString_Resize() fail, they set an exception. There's no need to set a new exception.
-
Jeremy Hylton authored
Consistently indent 4 spaces. Use whitespace around operators. Put braces in the right places.
-
Guido van Rossum authored
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 authored
-
Jeremy Hylton authored
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 authored
suggested in SF patch #424475. Also document exception return.
-
Tim Peters authored
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 authored
-
Guido van Rossum authored
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 authored
size(), parse150(): try int() first, catch OverflowError, fall back to long().
-
Fred Drake authored
-
Fred Drake authored
-
Jeremy Hylton authored
-
Guido van Rossum authored
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 authored
-
Fred Drake authored
specific, and updated some of the comments about the profile hook. This closes SF bug #471725.
-
Fred Drake authored
Reported by Francesco Trentini.
-
Guido van Rossum authored
typo.
-
- 15 Oct, 2001 3 commits
-
-
Tim Peters authored
-
Tim Peters authored
-
Tim Peters authored
-