Guido van Rossum [Fri, 29 Jan 1999 22:03:51 +0000 (22:03 +0000)]
Support a canonical() method, implementable by a derived class, to be
applied to all filenames before they are compared, looked up in the
breaks dictionary, etc. The default implementation does nothing --
it's implented as fast as possible via str(). A useful implementation
would make everything a absolute, e.g. return os.path.normcase(
os.path.abspath(filename)).
Barry Warsaw [Fri, 29 Jan 1999 21:55:03 +0000 (21:55 +0000)]
setup_readline(): Added a comment about memory leak (reported by
Purify) being caused by a bug in the readline library. Nothing we can
do about it.
Cause: readline_initialize_everything() throws away the return value
from rl_read_init_file(), but that happens to be the last reference to
a dynamically allocated char*.
Added missing DECREF's in the error branches when creating a compressor or
decompressor object. This required adding a flag to the struct which is
true if initialisation was completed; on object destruction, deflateEnd()
is only called if the flag is true.
Fred Drake [Fri, 29 Jan 1999 21:31:12 +0000 (21:31 +0000)]
fixup_descriptors(): Change the way we look for descriptor nodes;
this takes 5 minutes off the conversion of the whole tree by
reducing the number of tree-traversals from 14 to 1.
Fred Drake [Fri, 29 Jan 1999 16:42:37 +0000 (16:42 +0000)]
Define a general entity "&version;" that can be used as the current major
version of the Python interpreter. This is \version in the LaTeX format
of the documentation.
Jack Jansen [Fri, 29 Jan 1999 16:15:52 +0000 (16:15 +0000)]
Pythonpath converted to Rez source, and vers resource removed from
bundle to its own Rez source file. With these changes various resources
are all set automatically from .h files.
Fred Drake [Thu, 28 Jan 1999 23:59:58 +0000 (23:59 +0000)]
Update the docstring.
Lots of changes to get the paragraph marking to work, and not go into
an infinite recursion.
Start to rationalize markup of method signatures; not complete.
find_all_elements(): similar to getElementsByTagName(), but operates
on the not-quite-legal fragments we deal with here.
Simplifies several individual transforms.
fixup_sectionauthors(): Convert \sectionauthor items to <author> just
after the <section>'s <title>.
Guido van Rossum [Thu, 28 Jan 1999 22:02:47 +0000 (22:02 +0000)]
Move menu/key binding code from Bindings.py to EditorWindow.py,
with changed APIs -- it makes much more sense there.
Also add a new feature: if the first character of a menu label is
a '!', it gets a checkbox. Checkboxes are bound to Boolean Tcl variables
that can be accessed through the new getvar/setvar/getrawvar API;
the variable is named after the event to which the menu is bound.
Barry Warsaw [Thu, 28 Jan 1999 19:51:51 +0000 (19:51 +0000)]
Added a -s option which is useful for narrowing down memory leaks.
With -s only a single test is run. The next test run is chosen
sequentially from the list of all tests.
Barry Warsaw [Thu, 28 Jan 1999 04:54:33 +0000 (04:54 +0000)]
Slight reworking of this test. If nis.maps() gives a nis.error, then
raise an ImportError if not running verbose. This signals to the
regression framework that this test isn't applicable.
Barry Warsaw [Wed, 27 Jan 1999 23:13:59 +0000 (23:13 +0000)]
builtin_complex(): Nailed memory leak. This one's in the instance
test for classes with a __complex__() method. The attribute is pulled
out of the instance with PyObject_GetAttr() but this transfers
ownership and the function object was never DECREF'd.
Barry Warsaw [Wed, 27 Jan 1999 18:04:05 +0000 (18:04 +0000)]
initerrno(): Nailed a not-so-tiny memory leak. The de dictionary is
put into the module dict, but is never DECREF'd in this function, so
it and all its contents leak.
Barry Warsaw [Wed, 27 Jan 1999 17:48:27 +0000 (17:48 +0000)]
PyLong_FromString(): Nailed a small memory leak. In the str==start
test, we forgot that z is still pointing to a real live object.
DECREF() it before returning.
Fred Drake [Wed, 27 Jan 1999 17:37:36 +0000 (17:37 +0000)]
\py@linkToName: New macro to consolidate support for most internal
hyperlinking in the PDF version. This also allows many of the
macros that do this stuff to be a good bit more readable.
Takes the target name and link content as parameters.
Barry Warsaw [Wed, 27 Jan 1999 16:39:40 +0000 (16:39 +0000)]
err_input(): Nailed a small memory leak. If the error is E_INTR, the
v temporary variable was never decref'd. Test this by starting up the
interpreter, hitting C-c, then immediately exiting.
Same potential leak can occur if error is E_NOMEM, since the return is
done in the case block. Added Py_XDECREF(v); to both blocks, just
before the return.
Guido van Rossum [Tue, 26 Jan 1999 19:29:25 +0000 (19:29 +0000)]
Patch by Chris Petrilli (not really tested since I don't know this
module myself) to accept an option keyword argument (vars) that is
substituted on top of the defaults that were setup in __init__. The
patch also fixes the problem where you can't have recusive references
inside your configuration file.
Fred Drake [Tue, 26 Jan 1999 19:23:09 +0000 (19:23 +0000)]
\py@modindex: Format the index entry for the module index more like
that used in the "normal" index. No visual difference, but
more easily processed by helper scripts.
Guido van Rossum [Mon, 25 Jan 1999 22:36:24 +0000 (22:36 +0000)]
A gift from Fredrik Lundh: fast C implementation of expandtabs().
I've reformatted it, added a few comments, a test for tabsize <= 0,
and used the AS_STRING macro.
Fred Drake [Mon, 25 Jan 1999 21:57:07 +0000 (21:57 +0000)]
Allow recognition of attributes even if they don't have space in front
of them. I.e., '<a name="foo"href="bar.html">' will now have two
attributes recognized.
Guido van Rossum [Mon, 25 Jan 1999 21:38:29 +0000 (21:38 +0000)]
Rearrange the -I flags for compiling _tkinter.c so that
/usr/local/include comes before /usr/X11R1/include. On some Linux
distributions the latter apparently contains (standard!) a bad tcl.h
or tk.h.
Guido van Rossum [Mon, 25 Jan 1999 21:36:13 +0000 (21:36 +0000)]
There's a macro PycString_IMPORT which the documentation listed as
PycStringIO_IMPORT. While arguably the name used in the documentation
is more consistent, I think it's probably safer not to change the
macro definition and instead fix the doco.
Guido van Rossum [Mon, 25 Jan 1999 20:51:34 +0000 (20:51 +0000)]
Change clear_break() to the old signature clear_break(file, line).
Add new clear_bpbynumber() with single bpno argument. (Adapted from
a patch by Richard Wolff.)
Also some cleanup in error messages and moved some comments into a
docstring.