Fredrik Lundh [Sat, 8 Jul 2000 22:48:53 +0000 (22:48 +0000)]
this one's a bit risky, but I've spent some considerable time
staring at the diffs before checking this one in. let me know
asap if it breaks things on your platform.
-- ANSI-fying
(patch #100763 by Peter Schneider-Kamp, minus the
indentation changes and minus the changes the broke
the windows build)
Fredrik Lundh [Sat, 8 Jul 2000 17:43:32 +0000 (17:43 +0000)]
- changed __repr__ to use "unicode escape" encoding for unicode
strings, instead of the default encoding.
(see "minidom" thread for discussion, and also patch #100706)
Tim Peters [Sat, 8 Jul 2000 04:17:21 +0000 (04:17 +0000)]
Cray J90 fixes for long ints.
This was a convenient excuse to create the pyport.h file recently
discussed!
Please use new Py_ARITHMETIC_RIGHT_SHIFT when right-shifting a
signed int and you *need* sign-extension. This is #define'd in
pyport.h, keying off new config symbol SIGNED_RIGHT_SHIFT_ZERO_FILLS.
If you're running on a platform that needs that symbol #define'd,
the std tests never would have worked for you (in particular,
at least test_long would have failed).
The autoconfig stuff got added to Python after my Unix days, so
I don't know how that works. Would someone please look into doing
& testing an auto-config of the SIGNED_RIGHT_SHIFT_ZERO_FILLS
symbol? It needs to be defined if & only if, e.g., (-1) >> 3 is
not -1.
Tim Peters [Sat, 8 Jul 2000 00:32:04 +0000 (00:32 +0000)]
Got RID of redundant coercions in longobject.c (as spotted by Greg
Stein -- thanks!). Incidentally removed all the Py_PROTO macros
from object.h, as they prevented my editor from magically finding
the definitions of the "coercion", "cmpfunc" and "reprfunc"
typedefs that were being redundantly applied in longobject.c.
Fixed unicode() to use the new API PyUnicode_FromEncodedObject().
This adds support for instance to the constructor (instances
have to define __str__ and can return Unicode objects via that
hook; string return values are decoded into Unicode using the
current default encoding).
Fred Drake [Thu, 6 Jul 2000 19:42:19 +0000 (19:42 +0000)]
Fix bug #392, reported by Jonathan Giddy <jon@dstc.edu.au>:
In posixmodule.c:posix_fork, the function PyOS_AfterFork is called for
both the parent and the child, despite the docs stating that it should
be called in the new (child) process.
This causes problems in the parent since the forking thread becomes the
main thread according to the signal module.
Calling PyOS_AfterFork() only in the child fixes this. Changed for both
fork() and forkpty().
Fred Drake [Thu, 6 Jul 2000 19:38:49 +0000 (19:38 +0000)]
Python 2.0 is not supposed to use string exceptions in the standard library
& extensions, so create exceptions in extension modules using the
PyErr_NewException() API.
Fred Drake [Thu, 6 Jul 2000 18:09:02 +0000 (18:09 +0000)]
Correct a markup nit that caused a space to be dropped from the HTML
version (actually a LaTeX2HTML bug), and clarified a sentence in the
mktime() description based entirely on comments from Grant Griffin
<grant.griffin@honeywell.com>.
Fred Drake [Thu, 6 Jul 2000 16:12:47 +0000 (16:12 +0000)]
Minor changes. Explain that for class exceptions, use excdesc but do not
document the constructor parameters. Need a better way, but this will do
for now.
Added new codec APIs and a new interface method .encode() which
works just like the Unicode one. The C APIs match the ones in the Unicode
implementation, but were extended to be able to reuse the existing
Unicode codecs for string purposes too.
Conversions from string to Unicode and back are done using the
default encoding.
Added prototypes for the new codec APIs for strings. These APIs
match the ones in the Unicode implementation, but were extended
to be able to reuse the existing Unicode codecs for string
purposes too.
Conversion from string to Unicode and back are done using the
default encoding.
Fred Drake [Thu, 6 Jul 2000 04:51:04 +0000 (04:51 +0000)]
Several small changes, mostly to the markup, to improve consistency and
internal hyperlinking. Move some things around, also for consistency
with other modules ("See also" stuff tends to live at the \section level,
before sub-sections, etc.).
Tim Peters [Wed, 5 Jul 2000 22:56:52 +0000 (22:56 +0000)]
Add more "volatile" decls to stop gcc -Wall warnings.
Somebody w/ gcc please check that the wngs are gone!
There are cheaper (at runtime) ways to prevent the wngs, but
they're obscure and delicate. I'm going for the easy Big
Hammer here under the theory that PCRE will be replaced by
SRE anyway.
Added new .isalpha() and .isalnum() methods to match the same
ones on the Unicode objects. Note that the string versions use
the (locale aware) C lib APIs isalpha() and isalnum().
Fixed so the ZIP file (which is bundled into an executable) goes in the
temporary directory ('bdist_base').
Added --dist-dir option to control where the executable is put.
Fred Drake [Wed, 5 Jul 2000 02:24:39 +0000 (02:24 +0000)]
Created a new chapter on structured markup processing, including the
existing SGML, HTML, & XML support, and providing a home for the new
XML support as it becomes documented.