Fix leaking of instances by removing the elements variable that we
created on closing the parser. The elements variable is now created
in the reset() method, so that the sequence close(); reset();
... works.
Also, add the name of the entity reference that wasn't found to the
error message.
Barry Warsaw [Mon, 1 Feb 1999 17:09:00 +0000 (17:09 +0000)]
PyPcre_expand(): Fixed two memory leaks, where a PyString_FromString()
was appended to a list. Lists are reference count neutral, so the
string must be DECREF'd. Also added some checks for the return value
of PyList_Append().
Note: there are still some memory problems reported by Purify (I get
two Array Bounds Reads still and an Unitialized Memory Read). Also,
in scanning the code, there appears to be some potential problems
where return values aren't checked. To much to attack now though.
Patch by Sjoerd Mullender for better compatibility with the version
from Python 1.5.1:
If after __init__ finishes no new elements variable was created, this
patch will search the instance's namespace for all attributes whose
name start with start_ or end_ and put their value in a new elements
instance variable.
Just van Rossum [Sat, 30 Jan 1999 23:49:45 +0000 (23:49 +0000)]
There are now three possible ways to run the IDE:
- this file dropped onto the interpreter
- applet built by BuildApplet (contains only __main__)
- applet built by BuildIDE (contains all IDE modules)
Just van Rossum [Sat, 30 Jan 1999 17:46:34 +0000 (17:46 +0000)]
Fixed two typo's (Plugins -> PlugIns) and added some explicit path munging to allow the script to also work from the Scripts folder. Somehow either of these fixes solved a problem where it suddenly refused to make a PythonCore alias in the Extensions folder. -- jvr
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.