Commit Graph

25 Commits

Author SHA1 Message Date
Jack Jansen c5601f4839 Undefine DPRINTF before defining it, there was a conflict with some other
definition.
2002-06-26 20:41:30 +00:00
Tim Peters af3e8de580 First stab at rationalizing the PyMem_ API. Mixing PyObject_xyz with
PyMem_{Del, DEL} doesn't work yet (compilation problems).

pyport.h:  _PyMem_EXTRA is gone.

pmem.h:  Repaired comments.  PyMem_{Malloc, MALLOC} and
PyMem_{Realloc, REALLOC} now make the same x-platform guarantees when
asking for 0 bytes, and when passing a NULL pointer to the latter.

object.c:  PyMem_{Malloc, Realloc} just call their macro versions
now, since the latter take care of the x-platform 0 and NULL stuff
by themselves now.

pypcre.c, grow_stack():  So sue me.  On two lines, this called
PyMem_RESIZE to grow a "const" area.  It's not legit to realloc a
const area, so the compiler warned given the new expansion of
PyMem_RESIZE.  It would have gotten the same warning before if it
had used PyMem_Resize() instead; the older macro version, but not the
function version, silently cast away the constness.  IMO that was a wrong
thing to do, and the docs say the macro versions of PyMem_xyz are
deprecated anyway.  If somebody else is resizing const areas with the
macro spelling, they'll get a warning when they recompile now too.
2002-04-12 07:22:56 +00:00
Martin v. Löwis d4233b2b8c Include Python.h first. Fixes #530159. 2002-03-15 09:16:40 +00:00
Andrew M. Kuchling 3b96d0b199 Fix for bug #110651 (Jitterbug PR#343): only use the low 8 bits of an octal
escape, as documented in the comment for the check_escape() function
2000-08-02 13:41:18 +00:00
Peter Schneider-Kamp 7e01890986 merge Include/my*.h into Include/pyport.h
marked my*.h as obsolete
2000-07-31 15:28:04 +00:00
Thomas Wouters 7e47402264 Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either
comments, docstrings or error messages. I fixed two minor things in
test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't").

There is a minor style issue involved: Guido seems to have preferred English
grammar (behaviour, honour) in a couple places. This patch changes that to
American, which is the more prominent style in the source. I prefer English
myself, so if English is preferred, I'd be happy to supply a patch myself ;)
2000-07-16 12:04:32 +00:00
Tim Peters 54925f98d3 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.
2000-07-05 22:56:52 +00:00
Andrew M. Kuchling 94c3452ade Fix bug reported by atkins@gweep.net; re.compile(r"[\100-\410]")
dumps core.  Solution: fix check_escape() to match its comment and
   use only the low 8 bits of the octal number.
2000-06-01 03:02:48 +00:00
Andrew M. Kuchling fc9d2252af Patch from Vladimir Marangozov <marangoz@python.inrialpes.fr>
The same problem (mixed mallocs) exists for the pcre stack.
	The buffers md->... are allocated via PyMem_RESIZE in grow_stack(),
	while in free_stack() they are released with free() instead of
	PyMem_DEL().
2000-02-18 19:16:45 +00:00
Barry Warsaw b80667d5f3 pcre_exec(): Andrew Kuchling's patch for pcre memory leak. 1999-01-27 21:41:08 +00:00
Guido van Rossum 95864d35c6 Add dummy variable to avoid optimizer bug on OS/2 -- patch by Jeff Rush.
(AMK: you should probably copy this into your patch set for pcre.)
1998-12-21 18:35:49 +00:00
Guido van Rossum 04e00a4cf4 Fix benign problems found by a picky SGI compiler (unreachable break
after a return or goto).
1998-07-07 22:22:22 +00:00
Guido van Rossum dda6696be6 AMK's revised version of the previous patch. 1998-05-07 15:32:44 +00:00
Guido van Rossum 39b0f8976c Address warnings issued by the MSVC++ compiler 1998-04-10 21:52:06 +00:00
Guido van Rossum 042ff9eb3a AMK's latest 1998-04-03 21:13:31 +00:00
Guido van Rossum 816671c666 patch for re.sub bug, by AMK. 1998-03-10 04:55:29 +00:00
Guido van Rossum d0f432b840 A bug in PCRE could cause core dumps in patterns such as
'((a)*)*'. Andrew Kuchling posted a fix to the string-sig.
1998-02-20 21:45:14 +00:00
Guido van Rossum 557dea1ca2 AMK's latest -- synchronized with PCRE 1.04. 1997-12-22 22:46:52 +00:00
Guido van Rossum 58132c6799 AMK's latest; plus three null bytes that I added for purify 1997-12-17 00:24:13 +00:00
Guido van Rossum 1eadb41036 Patch (by Andrew Kuchling of course) to prevent named back references
in the pattern to wear out the reference count on small integers.
1997-12-15 17:33:24 +00:00
Guido van Rossum bd49ac4492 The 'l' flag (locale specific matching) has been renamed to 'L'. 1997-12-10 23:05:53 +00:00
Guido van Rossum 5070060d40 New pcre version from AMK 1997-12-08 17:15:20 +00:00
Guido van Rossum 57ba4f35f7 Patches by Fred Lundh to make it compile better with K&R compilers.
(Should really let AMK do this, but don't know when he'll give me a
new version.)
1997-12-02 20:40:28 +00:00
Guido van Rossum c386107838 Checking in AMK's latest installement.
(Two small changes to shup up gcc added.)
1997-10-08 02:07:40 +00:00
Guido van Rossum 51b3aa3d38 New "re" regular expression support.
This code is written by Philip Hazel and Andrew Kuchling.
It requires a new "re.py" module, too.
1997-10-06 14:43:11 +00:00