Guido van Rossum
2a5119b680
On Windows, need #include <windows.h>; and it's MS_WINDOWS, not MS_WIN32.
1998-05-29 01:28:40 +00:00
Guido van Rossum
00d93066b0
Changes to make it possible to write multi-threaded programs using
...
Tkinter. This adds a separate lock -- read the comments. (This was
also needed for Mark Hammond's attempts to make PythonWin
Tkinter-friendly.)
The changes have affected the EventHook slightly, too; and I've done
some more cleanup of the code that deals with the different versions
of Tcl_CreateFileHandler().
1998-05-28 23:06:38 +00:00
Guido van Rossum
578de30fd7
Some systems (e.g. Linux) use enums for some symbols (like IPPROTO_IP)
...
so that our #ifdef test has the wrong effect. Substitute hardcoded
values for some important symbols (but not for the whole range -- some
are pretty obscure so it's not worth it).
1998-05-28 20:18:18 +00:00
Fred Drake
d3dbb38e98
get_long(): Use PyErr_ExceptionMatches(...) instead of PyErr_Occurred(...).
1998-05-28 04:35:49 +00:00
Fred Drake
bebc97fcd7
t_bootstrap(): Use PyErr_ExceptionMatches(...) instead of PyErr_Occurred(...).
1998-05-28 04:35:12 +00:00
Fred Drake
764b984db5
Use PyErr_ExceptionMatches(...) instead of PyErr_Occurred() == ... in two
...
places.
1998-05-28 04:33:37 +00:00
Guido van Rossum
7bf15648a4
Use a different implementation of EventHook(). The new version
...
registers an input file handler for stdin with Tcl and handles Tcl
events until something is available on stdin; it then deletes the
handler and returns from EventHook().
This works with or without GNU readline, and doesn't busy-wait.
It still doesn't work for Mac or Windows :-(
1998-05-22 18:28:17 +00:00
Guido van Rossum
832f6d2890
Add an alias (and preferred name) "contains" for "sequenceIncludes".
...
Rationalized the doc strings.
Also simplify the module initialization -- we don't need a __version__
which is set to "$Rev" :-) and we don't need a fatal error when the
initialization fails.
1998-05-22 18:12:59 +00:00
Guido van Rossum
b88679b2a4
I think there was a tiny bug in new_function() -- the 'defaults'
...
argument was initialized to Py_None, but later checked for NULL.
Consistently use Py_None.
1998-05-22 00:57:31 +00:00
Guido van Rossum
b1ed9c5295
PySequence_In() -> PySequence_Contains().
1998-05-22 00:54:16 +00:00
Guido van Rossum
7df115de65
Make sure that no use of a function pointer gotten from a
...
tp_as_sequence or tp_as_mapping structure is made without checking it
for NULL first.
1998-05-22 00:53:47 +00:00
Guido van Rossum
a88c5f30c7
Correct bug doc string (discovered by Berthold Hoellmann):
...
get_line_buffer() does not take an optional argument.
1998-05-20 15:50:56 +00:00
Guido van Rossum
fa1fb7df31
When a .o file is an absolute pathname, assume it's a file for which
...
we have no .c source.
1998-05-14 02:37:45 +00:00
Guido van Rossum
4ccda15cd3
strop_replace(): balk if the pattern string is empty.
1998-05-14 02:36:29 +00:00
Guido van Rossum
ed33a3f415
whichmodule(): remove redundant PyErr_Clear(); add explicit setting
...
of error when sys.modules isn't there.
1998-05-14 02:34:46 +00:00
Guido van Rossum
02759c03f1
Don't delete glmodule.c on 'make clobber' (it's a checked in file!).
1998-05-14 02:33:57 +00:00
Guido van Rossum
b41addf6a6
Replace all calls to fprintf(stderr, ...) with calls to PySys_WriteStderr(...).
1998-05-12 15:02:41 +00:00
Guido van Rossum
597ac20708
Trivial little change: timer tokens shouldn't have a Print() function,
...
they should have a Repr() function.
1998-05-12 14:36:19 +00:00
Fred Drake
ed3da23e44
parser_compare_nodes(): Corrected a minor type error; eliminate one GCC
...
warning (at least under Linux).
1998-05-11 03:31:16 +00:00
Guido van Rossum
ae94cf292b
Fix by Sean Reifschneider:
...
- When facility not specified to syslog() method, use default from openlog()
(This is how it was claimed to work in the documentation)
- Potential resource leak of o_ident, now cleaned up in closelog()
- Minor comment accuracy fix.
1998-05-08 21:52:55 +00:00
Guido van Rossum
821a5e42bf
Added URLs for zlib's home page and the Windows DLL's home page .
1998-05-08 14:56:29 +00:00
Guido van Rossum
dda6696be6
AMK's revised version of the previous patch.
1998-05-07 15:32:44 +00:00
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
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
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
268397f513
Made lint a bit happier.
...
Fixed a memory leak in an error handler.
1998-04-29 14:16:32 +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
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
Guido van Rossum
690119621e
Purported fixes for 64-bit platforms with help from John Jorgensen
1998-04-23 20:23:00 +00:00
Guido van Rossum
115f517f77
Tiny patch for zlib 1.1.2
1998-04-23 20:22:11 +00:00
Fred Drake
301b5bea3f
In method & function tables, added a cast for the function pointers to keep
...
compilers happy.
initparser(): Remove unused variable.
gcc -Wall is now happy.
1998-04-21 22:31:45 +00:00
Guido van Rossum
2621637835
Add #ifdefs so Tcl_Finalize isn't referenced when it's not defined.
1998-04-20 18:47:52 +00:00
Guido van Rossum
7c33095b6b
Typo in usage message.
1998-04-13 20:28:18 +00:00
Fred Drake
503d8d66cc
The documentation threatened it would happen -- the functions that should
...
have been methods now are! Still available as functions for compatibility.
1998-04-13 18:45:18 +00:00
Guido van Rossum
cef113c524
Don't allow unescaped newlines in doc strings.
1998-04-13 18:11:55 +00:00
Fred Drake
43f8f9b894
Added support for pickling ast objects.
1998-04-13 16:25:46 +00:00
Fred Drake
10032ebb48
Module docstring indicated seek() isn't implemented, but it is.
1998-04-11 19:54:54 +00:00
Guido van Rossum
730806d3d9
Make new gcc -Wall happy
1998-04-10 22:27:42 +00:00
Guido van Rossum
39b0f8976c
Address warnings issued by the MSVC++ compiler
1998-04-10 21:52:06 +00:00
Guido van Rossum
5d30e740f5
Delete reference to reopmodule.c. Add comment about soundex' obsolescence.
1998-04-10 20:44:11 +00:00
Guido van Rossum
b53dc43769
Delete this obsolete module.
1998-04-10 20:38:41 +00:00
Guido van Rossum
bba92ca555
Add -t option to set the Py_TabcheckFlag flag.
1998-04-10 19:39:15 +00:00
Fred Drake
c542bc79c8
Support raise with no parameters.
1998-04-10 04:43:28 +00:00
Guido van Rossum
c6a681a57d
remove C++ entries of the form Class::method
1998-04-09 21:46:02 +00:00
Guido van Rossum
4f199eaa6e
Threading speedup patches by Christopher Lindblad <cjl@infoseek.com>.
1998-04-09 20:56:35 +00:00
Guido van Rossum
99c185e787
Add not_ and __not__.
1998-04-09 17:54:26 +00:00