Guido van Rossum [Thu, 14 Aug 1997 20:12:58 +0000 (20:12 +0000)]
Use _beginthread() and _endthread() in favor of CreateThread() and
ExitThread(). As discussed in c.l.p, this takes care of
initialization and finalization of thread-local storage allocated by
the C runtime system. Not sure whether non-MS compilers grok this
though (but who cares :-).
Guido van Rossum [Thu, 14 Aug 1997 19:57:07 +0000 (19:57 +0000)]
Merge Mac and Windows mods (which mostly affect the same problem -- no
usable createfilehandler). Define HAVE_CREATEFILEHANDLER to test
later. Also other Mac specific patches by Jack.
Guido van Rossum [Thu, 14 Aug 1997 19:40:34 +0000 (19:40 +0000)]
Don't call sys.exit() all over the place -- simply return the exit
status from main() and call sys.exit(main()) in the startup stub at
the end of the file.
Jeremy Hylton [Wed, 13 Aug 1997 23:19:55 +0000 (23:19 +0000)]
Many changes.
Change default alloc size for uncompressing to 16K.
Remove comment about core dumps when an invalid window sizes is used.
This bug has been fixed in zlib 1.0.4.
Two new optional arguments to decompress, wbits and bufsize. wbits
specifies the window size and bufsize specifies the initial output
string size.
In decompression code -- decompress and decompressobj methods -- use a
Python string (and _PyString_Resize) to collect the uncompressed
stream. Replaces a separate buffer that was copied into a string.
Fix bug in decompress that caused it to always realloc the buffer when
it was finished decompressing.
Modernized handling of optional arguments to compressobj.
Guido van Rossum [Wed, 13 Aug 1997 21:30:44 +0000 (21:30 +0000)]
Much rewritten. Added Win32 registry stuff (from getpath_nt.c, which
is now obsolete), and changed the default path calculations.
$PYTHONPATH is now added as a prefix (like it's always been on Unix);
$PYTHONHOME takes precedence over the program pathname; and only one
landmark is needed.
Guido van Rossum [Wed, 13 Aug 1997 19:57:53 +0000 (19:57 +0000)]
Made it real. Changed locking() to work with file descriptors instead
of Python file objects. Added open_osfhandle() (Mark had done some
work for that), get_osfhandle(), setmode(), and the console I/O
functions kbhit(), getch(), getche(), ungetch(), and putch().
Guido van Rossum [Wed, 13 Aug 1997 03:24:53 +0000 (03:24 +0000)]
Changes by AMK:
Removed handling of \e, \cX escapes, following a string-SIG discussion.
Fixed minor typos in re.py
re.error is now set equal to reop.error.
Move definition of constants like NORMAL and CHARCLASS into reop, which
exports them; re.py was changed to import them from reop.
Added C equivalents of _expand and expand_escape to reop, and changed
re.py to use them.
Guido van Rossum [Sun, 10 Aug 1997 16:47:17 +0000 (16:47 +0000)]
Support using -p/-P to point to the source/build directory instead of
the install directory. Added -h option to print the full usage
message; by default, only two lines are now printed for errors.
Jack Jansen [Fri, 8 Aug 1997 14:51:54 +0000 (14:51 +0000)]
Modified for CW Pro 1 projects. Convention used: .mu files are old
project files, which have to be cleaned up before checking in, .prj
files are CW Pro 1 projects (which are always clean). Prj files are
still binhexed, even though they only have a data fork (and, hence,
could be checked in in binary mode).
Jack Jansen [Fri, 8 Aug 1997 14:49:02 +0000 (14:49 +0000)]
Generate class, property and comparison code (finally!). The resulting
code isn't ideal yet: xxx.Window(1).Paragraph(3).font will only work
if all the classes and properties are declared in the same suite, but
at least font(Paragraph(3, Window(1))) always works.
Got the new structure working with MSVC 4.2.
main_nt.c is gone -- we can use Modules/python.c now.
Added Mark Hammond's module msvcrt.c (untested).
Added several new symbols.
Add a cast to the call to _Py_Dealloc in the expanded version of
Py_DECREF, to reduce the warnings when compiling with reference count
debugging on. (There are still warnings for each call to
_Py_NewReference -- too bad.)
New rules for deleting modules. Rather than having an elaborate
scheme based on object's types, have a simple two-phase scheme based
on object's *names*:
/* To make the execution order of destructors for global
objects a bit more predictable, we first zap all objects
whose name starts with a single underscore, before we clear
the entire dictionary. We zap them by replacing them with
None, rather than deleting them from the dictionary, to
avoid rehashing the dictionary (to some extent). */