| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
function had a reference to vPySys_WriteStderr(...) -- turn it back
into fprintf(stder, ...).
|
| |
|
|
|
|
|
|
|
|
| |
gethostbyaddr(). (Plain gethostbyname() returns only the IP address.)
This moves the code shared by gethostbyaddr() and gethostbyname_ex()
to a subroutine.
Original patch by Dan Stromberg; some tweaks by GvR.
|
| |
|
|
|
|
|
| |
status inspection" macros as functions: WEXITSTATUS(), WIFEXITED(),
WIFSIGNALED(), WIFSTOPPED(), WSTOPSIG(), WTERMSIG().
|
|
|
|
|
| |
previous version of this code would not show the offending input, even
though there was code that attempted this.)
|
| |
|
|
|
|
|
| |
get a decent error message when it's not a string (instead of
confusing errors when trying to use the thing).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
exceptions:
posix_error_with_filename(): New function which calls
PyErr_SetFromErrnoWithFilename()
The following methods have been changed to call
posix_error_with_filename():
posix_1str()
posix_strint()
posix_strintint()
posix_do_stat()
posix_mkdir()
posix_utime()
posix_readlink()
posix_open()
INITFUNC(): os.error (nee PosixError) is PyExc_OSError
|
| |
|
|
|
|
| |
to core dump if the first argument did not have a "group" attribute.
|
|
|
|
|
| |
O_getattr(): Added read-only access to the closed attribute, based on comment
from Michael Scharf <Michael.Scharf@Rhein-Neckar.de>.
|
|
|
|
|
|
|
|
|
| |
low-level Python exit handler. This can attempt to call Python code
at a point that the interpreter and thread state have already been
destroyed, causing a Bus Error. Given the intended use of
Py_AtExit(), I'm not convinced that it's a good idea to call it
earlier during Python's finalization sequence... (Although this is
the only use for it in the entire distribution.)
|
|
|
|
| |
callable objects than regular Pythonm functions as their im_func.
|
| |
|
|
|
|
| |
after a return).
|
|
|
|
| |
after a return or goto).
|
|
|
|
| |
after a return).
|
|
|
|
|
| |
(unreachable break after a return) but one was a real bug:
ReadFrames() was getting a bogus framecount because of a missing '&'.
|
| |
|
|
|
|
|
| |
This is because they are huge and the stack is limited on Windows.
Other platforms keep declaring it on the stack.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
a doc string.
|
| |
|
|
|
|
|
|
|
| |
PythonCmd_Error() but failed to return. The error wasn't very likely
(only when we run out of memory) but since the check is there we might
as well return the error. (I think that Barry introduced this buglet
when he added error checks everywhere.)
|
|
|
|
|
|
|
|
|
| |
# from my PC at home, but it can't send email :-(
Add a clarifying comment about the new ENTER_OVERLAP and
LEAVE_OVERLAP_TCL macros; get rid of all the bogus tests for deleted
interpreters (Tcl already tests for this; they were left over from an
earlier misguided attempt to fix the threading).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There were some serious problem with the thread-safety code.
The basic problem was that often the result was gotten out of
the Tcl interpreter object after releasing the Tcl lock.
Of course, another thread might have changed the return value
already, and this was indeed happening. (Amazing what trying
it on a different thread implementation does!)
The solution is to grab the Python lock without releasing the
Tcl lock, so it's safe to create a string object or set the
exceptions from the Tcl interpreter. Once that's done, the
Tcl lock is released.
Note that it's now legal to acquire the Python lock while the
the Tcl lock is held; but the reverse is not true: the Python
lock must be released before the Tcl lock is acquired. This
in order to avoid deadlines. Fortunately, there don't seem to
be any problems with this.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(The "sort of" is because it uses kbhit() to detect that the user
starts typing, and then no events are processed until they hit
return.)
Also fixed a nasty locking bug: EventHook() is called without the Tcl
lock set, so it can't use the ENTER_PYTHON and LEAVE_PYTHON macros,
which manipulate both the Python and the Tcl lock. I now only acquire
and release the Python lock.
(Haven't tested this on Unix yet...)
|
|
|
|
|
| |
of Windows file handles. Now it is at least compatible with itself on
Unix!
|
|
|
|
|
| |
tcgetattr(). This seems to be the only correct way to cope with
platform-specific structure members...
|
| |
|
|
|
|
| |
else the damn thing won't compile on Windows :-(
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
| |
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).
|
| |
|
| |
|
|
|
|
| |
places.
|
|
|
|
|
|
|
|
|
|
| |
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 :-(
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
argument was initialized to Py_None, but later checked for NULL.
Consistently use Py_None.
|
| |
|
|
|
|
|
| |
tp_as_sequence or tp_as_mapping structure is made without checking it
for NULL first.
|
|
|
|
| |
get_line_buffer() does not take an optional argument.
|
|
|
|
| |
we have no .c source.
|
| |
|