Fred Drake [Wed, 28 Jun 2000 17:50:51 +0000 (17:50 +0000)]
Trent Mick <trentm@activestate.com>:
Testing: test_array.py was also extended to check that one can set the
full range of values for each of the integral signed and unsigned
array types.
Fred Drake [Wed, 28 Jun 2000 17:49:30 +0000 (17:49 +0000)]
Trent Mick <trentm@activestate.com>:
The cause: Relatively recent (last month) patches to getargs.c added
overflow checking to the PyArg_Parse*() integral formatters thereby
restricting 'b' to unsigned char value and 'h','i', and 'l' to signed
integral values (i.e. if the incoming value is outside of the
specified bounds you get an OverflowError, previous it silently
overflowed).
The problem: This broke the array module (as Fredrik pointed out)
because *its* formatters relied on the loose allowance of signed and
unsigned ranges being able to pass through PyArg_Parse*()'s
formatters.
The fix: This patch fixes the array module to work with the more
strict bounds checking now in PyArg_Parse*().
How: If the type signature of a formatter in the arraymodule exactly
matches one in PyArg_Parse*(), then use that directly. If there is no
equivalent type signature in PyArg_Parse*() (e.g. there is no unsigned
int formatter in PyArg_Parse*()), then use the next one up and do some
extra bounds checking in the array module.
Marc-Andre Lemburg <mal@lemburg.com>:
Perfect hash table generator. Outputs a Python extension module
which provides access to the hash table (which is stored in static
C data) using custom code.
This module can currently only generates code for the ucnhash
module, but can easily be adapted to produce perfect hash tables
for other tasks where fast lookup in large tables is needed.
Marc-Andre Lemburg <mal@lemburg.com>:
Patch to the standard unicode-escape codec which dynamically
loads the Unicode name to ordinal mapping from the module
ucnhash.
Fred Drake [Wed, 28 Jun 2000 16:40:38 +0000 (16:40 +0000)]
Thomas Wouters <thomas@xs4all.net>:
This patch adds the openpty() and forkpty() library calls to posixmodule.c,
when they are available on the target
system. (glibc-2.1-based Linux systems, FreeBSD and BSDI at least, probably
the other BSD-based systems as well.)
Lib/pty.py is also rewritten to use openpty when available, but falls
back to the old SGI method or the "manual" BSD open-a-pty
code. Openpty() is necessary to use the Unix98 ptys under Linux 2.2,
or when using non-standard tty names under (at least) BSDI, which is
why I needed it, myself ;-) forkpty() is included for symmetry.
Marc-Andre Lemburg <mal@lemburg.com>:
MSVC project file for the new module ucnhash. This may have to
be added to pcbuild.dsw with an dependancy on python16.
Marc-Andre Lemburg <mal@lemburg.com>:
New ucnhash module by Bill Tutt. This module contains the hash
table needed to map Unicode character names to Unicode ordinals
and is loaded on-the-fly by the standard unicode-escape codec.
Fred Drake [Wed, 28 Jun 2000 15:07:31 +0000 (15:07 +0000)]
Added the atexit module and documentation from Skip Montanaro
<skip@mojam.com>. Revisions to the markup to make it pass LaTeX, added
an index entry and a reference from the sys.exitfunc documentation.
Greg Ward [Wed, 28 Jun 2000 01:29:09 +0000 (01:29 +0000)]
Lyle Johnson: added 'build_temp' parameter to 'link_shared_{lib,object}()'
methods (but not 'link_executable()', hmmm). Currently only used by
BCPPCompiler; it's a dummy parameter for UnixCCompiler and MSVCCompiler.
Also added 'bcpp' to compiler table used by 'new_compiler()'.
Greg Ward [Wed, 28 Jun 2000 01:20:35 +0000 (01:20 +0000)]
Lyle Johnson's interface to Borland C++, with a few editorial comments by me.
Two major points:
* lots of overlap with MSVCCompiler; the common code really should be
factored out into a base class, say WindowsCCompiler
* it doesn't work: weird problem spawning the linker (see comment for
details)
Added support for mouse functions: mousemask(), mouseinterval(),
getmouse(), ungetmouse(), and window.enclose(). wmouse_trafo() seems
of marginal importance at the moment.
Greg Ward [Tue, 27 Jun 2000 01:59:06 +0000 (01:59 +0000)]
Fixed LDSHARED for AIX, based on a patch by Rene Liebscher.
Ditched my old code that fixed relative paths in the Makefile -- didn't work,
doomed to failure, etc.
Greg Ward [Tue, 27 Jun 2000 01:37:10 +0000 (01:37 +0000)]
Thomas Heller: added --swig-cpp option and fixed silly typos in SWIG support.
Also supposedly made some change to where .lib files wind up under MSVC++,
but I don't understand how to code is doing what Thomas says it's
doing.
Greg Ward [Tue, 27 Jun 2000 01:21:22 +0000 (01:21 +0000)]
Added 'include_dirs' parameters all over the place.
Added 'check_lib()', which provides a subset of the functionality of
'check_func()' with a simpler interface and implementation.
Greg Ward [Sun, 25 Jun 2000 03:14:13 +0000 (03:14 +0000)]
Minor wording tweaks.
Kludged the extra-wide table that summarizes the manifest template language
(works with LaTeX, but is an *evil* kludge and could well break LaTeX2HTML
or similar...).
Greg Ward [Sun, 25 Jun 2000 02:31:16 +0000 (02:31 +0000)]
Define the 'executables' class attribute so the CCompiler constructor
doesn't blow up. We don't currently use the 'set_executables()' bureaucracy,
although it would be nice to do so for consistency with UnixCCompiler.
Greg Ward [Sun, 25 Jun 2000 02:23:11 +0000 (02:23 +0000)]
Fixed the "pre-link hook" so it actually works, mainly by renaming it
to 'msvc_prelink_hack()', adding the parameters that it actually needs,
and only calling it for MSVC compiler objects. Generally gave up on the
idea of a general "hook" mechanism: deleted the empty 'precompile_hook()'.
Greg Ward [Sun, 25 Jun 2000 02:10:46 +0000 (02:10 +0000)]
Fixed a few silly bugs in my SWIG support code. (Hey, I said it was
experimental and untested.)
Call 'customize_compiler()' after getting CCompiler object.
Greg Ward [Sun, 25 Jun 2000 02:09:14 +0000 (02:09 +0000)]
Added the 'customize_compiler()' function, which plugs in the essential
information about building Python extensions that we discovered in
Python's makefile. Currently only needed on Unix, so does nothing on
other systems.
Greg Ward [Sun, 25 Jun 2000 02:08:18 +0000 (02:08 +0000)]
Introduced some bureaucracy for setting and tracking the executables
that a particular compiler system depends on. This consists of the
'set_executables()' and 'set_executable()' methods, and a few lines in
the constructor that expect implementation classes to provide an
'executables' attribute, which we use to initialize several instance
attributes. The default implementation is somewhat biased in favour of
a Unix/DOS "command-line" view of the world, but it shouldn't be too
hard to override this for operating systems with a more sophisticated
way of representing programs-to-execute.
Greg Ward [Sun, 25 Jun 2000 02:05:29 +0000 (02:05 +0000)]
Got rid of direct dependence on the sysconfig module. Mainly, this
meant playing along with the new "dictionary of executables" scheme
added to CCompiler by adding the 'executables' class attribute, and
changing all the compile/link/etc. methods to use the new attributes
(which encapsulate both the program to run and its standard arguments,
so it was a *little* bit more than just changing some names).
Greg Ward [Sat, 24 Jun 2000 20:40:02 +0000 (20:40 +0000)]
Added 'split_quoted()' function to deal with strings that are quoted in
Unix shell-like syntax (eg. in Python's Makefile, for one thing -- now that
I have this function, I'll probably allow quoted strings in config files too.
Greg Ward [Sat, 24 Jun 2000 17:22:39 +0000 (17:22 +0000)]
Changed the default installation directory for data files (used by
the "install_data" command to the installation base, which is usually just
sys.prefix. (Any setup scripts out there that specify data files will have
to set the installation directory, relative to the base, explicitly.)
Greg Ward [Sat, 24 Jun 2000 01:23:37 +0000 (01:23 +0000)]
Changed so all the help-generating functions are defined, at module-level,
in the module of the command classes that have command-specific
help options. This lets us keep the principle of lazily importing
the ccompiler module, and also gets away from defining non-methods
at class level.
Jeremy Hylton [Fri, 23 Jun 2000 19:37:02 +0000 (19:37 +0000)]
part 2 of Neil Schemenauer's GC patches:
This patch modifies the type structures of objects that
participate in GC. The object's tp_basicsize is increased when
GC is enabled. GC information is prefixed to the object to
maintain binary compatibility. GC objects also define the
tp_flag Py_TPFLAGS_GC.
Guido van Rossum [Wed, 21 Jun 2000 20:01:10 +0000 (20:01 +0000)]
Sjoerd Mullender:
These two fixes were approved by me.
Peter Kropf:
There's a problem with the xmllib module when used with JPython. Specifically,
the JPython re module has trouble with the () characters in strings passed into
re.compile.
Spiros Papadimitriou:
I just downloaded xmllib.py ver. 0.3 from python.org and there
seems to be a slight typo: Line 654 ("tag = self.stack[-1][0]"
in parse_endtag), is indented one level more than it should be.
I just thought I'd let you know...
Greg Ward [Wed, 21 Jun 2000 03:33:03 +0000 (03:33 +0000)]
Implementation of the CCompiler class for Cygwin and Mingw32, ie. the two
major ports of GCC to Windows. Contributed by Rene Liebscher, and quite
untested by me. Apparently requires tweaking Python's installed config.h
and adding a libpython.a to build extensions.
Greg Ward [Wed, 21 Jun 2000 03:00:50 +0000 (03:00 +0000)]
Fleshed out and added a bunch of useful stuff, notably 'check_func()',
'try_cpp()', 'search_cpp()', and 'check_header()'. This is enough that
the base config is actually useful for implementing a real config
command, specifically one for mxDateTime.
Greg Ward [Wed, 21 Jun 2000 02:58:46 +0000 (02:58 +0000)]
Added 'preprocess()' method to CCompiler interface, and implemented
it in UnixCCompiler. Still needs to be implemented in MSVCCompiler (and
whatever other compiler classes are lurking out there, waiting to be
checked in).
Jeremy Hylton [Tue, 20 Jun 2000 19:10:44 +0000 (19:10 +0000)]
Add new parser error code, E_OVERFLOW. This error is returned when
the number of children of a node exceeds the max possible value for
the short that is used to count them. The Python runtime converts
this parser error into the SyntaxError "expression too long."