Commit Graph

8211 Commits

Author SHA1 Message Date
Guido van Rossum a5e54d02a0 Use (void) to throw away a function result, not (void *) ! 1998-05-01 18:58:59 +00:00
Guido van Rossum 0132f69c2e Another optimization, probably of negligeable effect: instead of
calling self.tk.getint() and self.tk.getdouble(), call the globals
getint() and getdouble(), which in turn are just names for the Python
builtins int() and double().  (Making them globals actually save a
dict lookup compared to using the built-in.)  The corresponding
methods of class Misc have been changed similarly.  (Note that
getboolean() hasn't been changed because there's no Python
equivalent.)

The use of int() and float() has another advantage: if/when Tcl calls
can actually return Tcl objects with other types than string, use of
int() and float() is essential.
1998-04-30 17:50:36 +00:00
Guido van Rossum cc8e1a4ed7 Add some help for AIX. (Konrad Hinsen) 1998-04-30 13:34:12 +00:00
Guido van Rossum dc59340646 In _bind(), found a way to test for break without a temp variable. 1998-04-29 22:16:57 +00:00
Guido van Rossum f975699c07 Save a tiny bit of time: self.tk.call takes a tuple argument so it's
not needed to say apply(self.tk.call, t); self.tk.call(t) has the same
effect.  This cuts down tremendously on the number of apply() calls
made.  No measurable effect, but at the very least it saves the lookup
of apply() in the globals!
1998-04-29 21:57:08 +00:00
Guido van Rossum f0c891a2b2 Import MacOS at the top instead of insize Tk.__init__() -- the latter
repeats the I/O for the failed import on each interpreter creation.
1998-04-29 21:43:36 +00:00
Fred Drake c9b8a57040 cleanup(): Remove *all* the temp files related to index generation! 1998-04-29 21:28:25 +00:00
Guido van Rossum 302be44e96 When following symlinks to the real executable, use a loop so a
symlink to a symlink can work.
(Jack)
1998-04-29 21:07:06 +00:00
Fred Drake 91eeefdee4 Work around lack of support for \if... in latex2html. 1998-04-29 17:56:44 +00:00
Fred Drake 89a1d4ad3a Set $TEXINPUTS='' to make l2h pick up the right thing from the environment. 1998-04-29 16:58:13 +00:00
Guido van Rossum 212643f199 Still somewhat experimental speedup. This appears to speed up the
most common interface to Tcl, the call() method, by maybe 20-25%.

The speedup code avoids the construction of a Tcl command string from
the argument list -- the Tcl argument list is immediately parsed back
by Tcl_Eval() into a list that is *guaranteed* (by Tcl_Merge()) to be
exactly the same list, so instead we look up the command info and call
the command function directly.  If the lookup fails, we fall back to
the old method (Tcl_Merge() + Tcl_Eval()) so we don't need to worry
about special cases like undefined commands or the occasional command
("after") that sets the info.proc pointer to NULL -- let TclEval()
deal with these.
1998-04-29 16:22:14 +00:00
Guido van Rossum 9d1b7ae65b Add a new method of interpreter objects, interpaddr(). This returns
the address of the Tcl interpreter object, as an integer.  Not very
useful for the Python programmer, but this can be called by another C
extension that needs to make calls into the Tcl/Tk C API and needs to
get the address of the Tcl interpreter object.  A simple cast of the
return value to (Tcl_Interp *) will do the trick now.
1998-04-29 16:17:01 +00:00
Fred Drake 06245ac2fa Fix documentation based on comments from Sean Reifschneider
<jafo-9804@tummy.com>.

Logical markup.
1998-04-29 14:38:34 +00:00
Guido van Rossum 7e6d18c1c0 Replace all calls to acquire_lock() and release_lock() with acquire()
and release() instead.
1998-04-29 14:29:32 +00:00
Fred Drake 268397f513 Made lint a bit happier.
Fixed a memory leak in an error handler.
1998-04-29 14:16:32 +00:00
Fred Drake 9fab3aa52e Move a bit closer to HTML generation without depending on the temp files
being in the current directory.

Be more careful cleaning up.

Correct an error in a comment.

Add recent additions to the dependencies for lib.dvi.
1998-04-28 19:20:43 +00:00
Fred Drake 310094ccce do_cmd_sectcode(): Obsolete; removed. 1998-04-28 18:38:40 +00:00
Fred Drake b5aa3de118 Remove extra cruft for texi processing. 1998-04-28 18:37:12 +00:00
Fred Drake 2a3ab4fac1 Do better hiding of internal names. 1998-04-28 18:31:50 +00:00
Fred Drake 08c5dfc5a4 do_cmd_key(): Obsolete; removed. 1998-04-28 18:31:17 +00:00
Fred Drake 24340ea583 Fixed \code so word wrapping is allowed.
Removed some old stuff.

Do better hiding of internal names.
1998-04-28 18:30:34 +00:00
Fred Drake ca6b4fe36b Section for bisect module. 1998-04-28 18:28:21 +00:00
Fred Drake 188a8471b8 Moved popen2 entry to make more sense.
Added bisect entry.
1998-04-28 18:27:53 +00:00
Fred Drake 125024a87d Updated. 1998-04-28 18:27:22 +00:00
Guido van Rossum e32907df67 Get rid of the unused ifdefed-out old sort code. 1998-04-28 17:54:03 +00:00
Guido van Rossum 2ea1c94b9a On the Mac a call to TkMacInitMenus is needed. Also, we pass
appropriate events to Sioux so the console window remains functional.
(Jack)
1998-04-28 16:12:43 +00:00
Guido van Rossum 19efc5fb80 Add a declaration for strdup() for the Mac.
(Jack)
1998-04-28 16:10:19 +00:00
Guido van Rossum 5c069fd4b1 Generate the clear() method manually (calling __GLclear(), another
name for clear()). This fixes the name clash with curses.
(Jack)
1998-04-28 16:09:16 +00:00
Guido van Rossum 239a218bac Type casts, and added a strdup() declaration for the Mac.
(Jack)
1998-04-28 16:08:19 +00:00
Guido van Rossum 9b00dfae75 If USE_STACKCHECK is defined use PyOS_CheckStack() in the repr and str
routines. This catches a slightly different set of crashes than the
recursive-repr fix.
(Jack)
1998-04-28 16:06:54 +00:00
Guido van Rossum f2044e1a71 Enable ftruncate() on the Mac.
(Jack)
1998-04-28 16:05:59 +00:00
Guido van Rossum 92f01c54d4 accept * in return value type and convert it to _ptr after the
typename, as in argument types.
(Jack)
1998-04-28 16:04:50 +00:00
Guido van Rossum db9a7b9ef6 Style and StyleParameter are two different types.
(Jack)
1998-04-28 16:04:26 +00:00
Guido van Rossum 8b3c30c0eb class ByAddressType, a simple Type but passed by address even on
input.
(Jack)
1998-04-28 16:04:12 +00:00
Guido van Rossum 57a0661cb8 On the Mac, create the Temporary Items folder if it does not exist yet.
(Jack)
1998-04-28 16:03:34 +00:00
Guido van Rossum 9c93a69335 Put quotes around the filename, so spaces in filenames work.
(Jack)
1998-04-28 16:03:03 +00:00
Guido van Rossum 50cc04ee03 Mac CodeWarrior has faulty declaration for hypot, which we hide with a
#define.
(Jack)
1998-04-28 16:02:29 +00:00
Guido van Rossum 53117ae82a typo in error message (fname vs. file).
(Jack)
1998-04-28 16:01:13 +00:00
Guido van Rossum b86ba124ea Support byte-swapped dbhash (bsddb) files. Found by Ben Sayer. 1998-04-28 15:41:03 +00:00
Guido van Rossum 2aefe8d7c0 Document changed semantics -- open() now guesses the db type and error
is now a tuple of various and sundry exceptions.
1998-04-28 15:29:26 +00:00
Guido van Rossum fc1f64d90d Oops, I had 'n' and 'c' mixed up in my mind. Get rid of the comment
that wonders what the difference is and explain them properly.
1998-04-28 15:23:09 +00:00
Guido van Rossum a5c0998242 Inspired by Ben Sayer, rewritten the code and some of the comments to
be more intelligent when the database already exists (use the module
for the existing file, according to whichdb).  Noted in the doc
strings that there doesn't seem to be a different between 'c' and 'n'.
1998-04-28 15:19:34 +00:00
Fred Drake f8d50bfdb0 Hook in the calendar and popen2 sections. 1998-04-28 14:29:27 +00:00
Fred Drake 1c127e74af calendar module section for the library reference, by Drew Csillag. 1998-04-28 14:28:57 +00:00
Fred Drake 6afad3792d popen2 section for the library reference, contributed by Drew Csillag, with
some reorganization.
1998-04-28 14:28:15 +00:00
Fred Drake 2a1cc3e171 Use of \key and \kbd were isolated to one instance each in this file;
normalize to \kbd to allow removal of \key from the document class.
1998-04-28 13:38:54 +00:00
Guido van Rossum 82e6a8f80d Quicksort retuned by Tim Peters. 1998-04-28 13:17:56 +00:00
Guido van Rossum bee64533d6 Use a try-except so that the pickle file is written even when we die
because of an unexpected exception.
1998-04-27 19:35:15 +00:00
Guido van Rossum e86271af72 When setting the event structure fields, don't die when the widget
name is not registered; simply use the string.  This happens for
tear-off widgets (e.g. if you've registered enter/leave events for the
menu).
1998-04-27 19:32:59 +00:00
Guido van Rossum 1f41f846a3 Instead of calling mktime(), which has all sorts of unwanted side
effects, simply zero out the struct tm buffer before using it; this
should take care of the BSD folks' concern just as well.
1998-04-27 19:04:26 +00:00