| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Patch by T. Wouters.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
| |
& extensions, so create exceptions in extension modules using the
PyErr_NewException() API.
|
|
|
|
| |
XXX should perhaps support history truncation as well
|
|
|
|
| |
Added two functions that were left out of the method definition table.
|
|
|
|
| |
to be absolute.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
- reorganized some code to get rid of -Wall and -W4
warnings
- fixed default argument handling for sub/subn/split
methods (reported by Peter Schneider-Kamp).
|
| |
|
|
|
|
|
| |
any object which can be converted to Unicode by means of
PyUnicode_FromObject().
|
|
|
|
|
|
|
|
|
| |
It gets initialized when pyexpat is imported, and is only accessible as an
attribute of pyexpat; it cannot be imported itself. This allows it to at
least be importable after pyexpat itself has been imported by adding it
to sys.modules, so it is not quite as strange.
This arrangement needs to be better thought out.
|
|
|
|
| |
noted by Marc-Andre Lemburg <mal@lemburg.com>.
|
| |
|
|
|
|
|
|
|
| |
which some C libs define (e.g. glibc).
Added a fallback default value for NSIG which hopefully provides
enough room for signal slots.
|
| |
|
|
|
|
| |
>= 2.0.5. One still is:-(
|
|
|
|
| |
- changed "group" operator to "groupref"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the pattern must have a fixed width.
- got rid of array-module dependencies; the match pro-
gram is now stored inside the pattern object, rather
than in an extra string buffer.
- cleaned up a various of potential leaks, api abuses,
and other minors in the engine module.
- use mal's new isalnum macro, rather than my own work-
around.
- untabified test_sre.py. seems like I removed a couple
of trailing spaces in the process...
|
|
|
|
|
|
|
| |
Revise math_1(), math_2(), stub-generating macros, and function tables to
use PyArg_ParseTuple() and properly provide the function name for error
message generation.
Fix pow() docstring for MPW 3.1; had said "power" instead of "pow".
|
|
|
|
| |
Typo in string literal: execpt --> except
|
|
|
|
|
|
|
|
| |
"lastgroup" is the name of the last matched capturing group,
"lastindex" is the index of the same group. if no group was
matched, both attributes are set to None.
the (?P#) feature will be removed in the next relase.
|
|
|
|
| |
Reported on c.l.py by Kirill Simonov.
|
|
|
|
|
|
|
|
|
|
| |
used by the code generator)
- changed max repeat value in engine (to match earlier array fix)
- added experimental "which part matched?" mechanism to sre; see
http://hem.passagen.se/eff/2000_07_01_bot-archive.htm#416954
or python-dev for details.
|
|
|
|
|
|
|
|
|
| |
speedup for some tests, including the python tokenizer.
-- added support for an optional charset anchor to the engine
(currently unused by the code generator).
-- removed workaround for array module bug.
|
|
|
|
| |
- minor comment touchups in the C module
|
|
|
|
|
|
|
|
| |
-- changed 1.6 to 2.0 in the file headers
-- fixed ISALNUM macro for the unicode locale. this
solution isn't perfect, but the best I can do with
Python's current unicode database.
|
|
|
|
|
|
|
| |
the bind(), connect(), and connect_ex() methods must be a single
parameter.
Originally part of 1.98, reverted in 1.100.
|
|
|
|
| |
Include limits.h if we have it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CHAR_MAX, use hardcoded -128 and 127. This may seem strange, unless
you realize that we're talking about signed bytes here! Bytes are
always 8 bits and 2's complement. CHAR_MIN and CHAR_MAX are
properties of the char data type, which is guaranteed to hold at least
8 bits anyway.
Otherwise you'd get failing tests on platforms where unsigned char is
the default (e.g. AIX).
Thanks, Vladimir Marangozov, for finding this nit!
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
if the multiline flag isn't given.
|
|
|
|
|
| |
Setup.config.in. The latter contains all configure-time selectable
modules; currently thread and gc.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The common technique for printing out a pointer has been to cast to a long
and use the "%lx" printf modifier. This is incorrect on Win64 where casting
to a long truncates the pointer. The "%p" formatter should be used instead.
The problem as stated by Tim:
> Unfortunately, the C committee refused to define what %p conversion "looks
> like" -- they explicitly allowed it to be implementation-defined. Older
> versions of Microsoft C even stuck a colon in the middle of the address (in
> the days of segment+offset addressing)!
The result is that the hex value of a pointer will maybe/maybe not have a 0x
prepended to it.
Notes on the patch:
There are two main classes of changes:
- in the various repr() functions that print out pointers
- debugging printf's in the various thread_*.h files (these are why the
patch is large)
Closes SourceForge patch #100505.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-- added pickling support (only works if sre is imported)
-- fixed wordsize problems in engine
(instead of casting literals down to the character size,
cast characters up to the literal size (same as the code
word size). this prevents false hits when you're matching
a unicode pattern against an 8-bit string. (unfortunately,
this broke another test, but I think the test should be
changed in this case; more on that on python-dev)
-- added sre.purge function
(unofficial, clears the cache)
|
|
|
|
| |
- untabified sre_constants.py
|
|
|
|
| |
- added test suite
|
| |
|
|
|
|
|
| |
Berkeley DB 2.0 or newer; most Linux distros will include a more recent
version than 1.85.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes possible overflows in the socket module for 64-bit
platforms (mainly Win64). The changes are:
- abstract the socket type to SOCKET_T (this is SOCKET on Windows, int
on Un*x), this is necessary because sizeof(SOCKET) > sizeof(int) on
Win64
- use INVALID_SOCKET on Win32/64 for an error return value for
accept()
- ensure no overflow of the socket variable for: (1) a PyObject return
value (use PyLong_FromLongLong if necessary); and (2) printf
formatting in repr().
Closes SourceForge patch #100516.
|
|
|
|
|
|
|
| |
Tim posted a long comment to python-dev (subject: "Controversial patch
(cmath)"; date: 6/29/00). The conclusion is that this whole module
stinks and this patch isn't perfect, but it's better than the acosh
and asinh we had, so let's check it in.
|
|
|
|
|
|
| |
- fixed compiler problems when using locale/unicode flags
- fixed group/octal code parsing in sub/subn templates
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
group reset problem. in the meantime, I added some
optimizations:
- added "inline" directive to LOCAL
(this assumes that AC_C_INLINE does what it's
supposed to do). to compile SRE on a non-unix
platform that doesn't support inline, you have
to add a "#define inline" somewhere...
- added code to generate a SRE_OP_INFO primitive
- added code to do fast prefix search
(enabled by the USE_FAST_SEARCH define; default
is on, in this release)
|