| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
resized after creation. 0-length strings are usually shared
and _PyString_Resize() fails on these shared strings.
Fixes [ Bug #111667 ] unicode core dump.
|
|
|
|
| |
see: http://www.python.org/pipermail/python-dev/2000-August/014971.html
|
|
|
|
|
|
| |
Properly end a comment block. It was terminated fine later but by a subsequent
block and. It was also in #if 0. This patch is so trivial I can't believe I am
talking about it. :)
|
|
|
|
|
| |
return value to int is safe here because it previously checked that
there will be no overflow.
|
|
|
|
|
| |
huge switch statement broken up. This will probably not be necessary when
the Win64 compiler matures.
|
|
|
|
|
|
|
|
|
|
| |
change to regrtest.py to allow optional running of test_largefile ('cause it's
slow on Win64).
This closes patches:
http://sourceforge.net/patch/index.php?func=detailpatch&patch_id=100510&group_id=5470
and
http://sourceforge.net/patch/index.php?func=detailpatch&patch_id=100511&group_id=5470
|
|
|
|
| |
Closes Patch #101065.
|
| |
|
|
|
|
|
|
|
| |
function (together with other locale aware ones) should into a new collation
support module. See python-dev for a discussion of this removal.
Note: This patch should also be applied to the 1.6 branch.
|
| |
|
|
|
|
| |
Ensure that # of args to sprintf always matches # of format specifiers.
|
|
|
|
| |
snprintf() is available.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the Python Unicode implementation.
The internal buffer used for implementing the buffer protocol
is renamed to defenc to make this change visible. It now holds the
default encoded version of the Unicode object and is calculated
on demand (NULL otherwise).
Since the default encoding defaults to ASCII, this will mean that
Unicode objects which hold non-ASCII characters will no longer
work on C APIs using the "s" or "t" parser markers. C APIs must now
explicitly provide Unicode support via the "u", "U" or "es"/"es#"
parser markers in order to work with non-ASCII Unicode strings.
(Note: this patch will also have to be applied to the 1.6 branch
of the CVS tree.)
|
|
|
|
|
| |
Revise the tp_repr handler to produce a more "minimal" presentation.
Make the tolist() method use PyArg_ParseTuple() and provide a docstring.
|
|
|
|
|
|
| |
This doesn't change the copyright status for these files -- just the
markings! Doing it on the main branch for these three files for which
the HEAD revision was pushed back into 1.6.
|
|
|
|
|
| |
This is a notice without a date, which apparently is not a claim to
copyright but only advice to the reader. IANAL. :-)
|
|
|
|
| |
marked my*.h as obsolete
|
|
|
|
| |
Leave the actual #define in for API compatibility.
|
| |
|
|
|
|
| |
they include prototypes.
|
|
|
|
|
| |
char**) and return an int even on PC platforms. If not, please fix
PC/utils/makesrc.c ;-P
|
| |
|
|
|
|
|
|
| |
New code will see the macros and therefore use the PyXXX_Size()
APIs instead.
By Thomas Wouters.
|
|
|
|
| |
clean out some other warnings
|
| |
|
|
|
|
| |
(patch #100912)
|
|
|
|
|
| |
unicodeobject.c(735) :
error C2143: syntax error : missing ';' before '}'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The UTF-8 decoder is still buggy (i.e. it doesn't pass Markus Kuhn's
stress test), mainly due to the following construct:
#define UTF8_ERROR(details) do { \
if (utf8_decoding_error(&s, &p, errors, details)) \
goto onError; \
continue; \
} while (0)
(The "continue" statement is supposed to exit from the outer loop,
but of course, it doesn't. Indeed, this is a marvelous example of
the dangers of the C programming language and especially of the C
preprocessor.)
|
|
|
|
|
|
|
|
|
|
| |
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 ;)
|
|
|
|
| |
free() the GC pointer, not the object pointer.
|
|
|
|
| |
or .fileno() method
|
|
|
|
| |
need to be cleared.
|
| |
|
|
|
|
| |
add macros for backwards compatibility with C source
|
| |
|
| |
|
|
|
|
|
|
|
| |
use PyString_AS_STRING macro on local string object
when resizing string, make sure resized string will always be big enough
split string containing error message across two lines
add test to string_tests that causes resizing
|
|
|
|
| |
better error message for unicode coercion failure
|
|
|
|
|
|
|
|
| |
seqlen==1 clause, before returning item, we need to DECREF seq. In
the res=PyString... failure clause, we need to goto finally to also
decref seq (and the DECREF of res in finally is changed to a
XDECREF). Also, we need to DECREF seq just before the
PyUnicode_Join() return.
|
|
|
|
|
| |
1. PySequence_Fast_GET_ITEM is a macro and borrows a reference
2. The seq returned from PySequence_Fast must be decref'd
|
|
|
|
|
|
| |
implementation -- use PySequence_Fast interface to iterate over elements
interface -- if instance object reports wrong length, ignore it;
previous version raised an IndexError if reported length was too high
|
|
|
|
|
|
|
|
|
|
| |
value is calculated from the character values, in a way
that makes sure an 8-bit ASCII string and a unicode string
with the same contents get the same hash value.
(as a side effect, this also works for ISO Latin 1 strings).
for more details, see the python-dev discussion.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
was cascades of warnings about mismatching const decls. Overall,
I think const creates lots of headaches and solves almost
nothing. Added enough consts to shut up the warnings, but
this did require casting away const in one spot too (another
usual outcome of starting down this path): the function
mymemreplace can't return const char*, but sometimes wants to
return its first argument as-is, which latter must be declared
const char* in order to avoid const warnings at mymemreplace's
call sites. So, in the case the function wants to return the
first arg, that arg's declared constness must be subverted.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
the standard for Python implementation.
|