| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
| |
Make the indentation and brace placement internally consistent.
|
| |
|
| |
|
|
|
|
|
| |
strings, instead of the default encoding.
(see "minidom" thread for discussion, and also patch #100706)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
contains 16 bits. Not true on Cray J90.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
rid of Py_PROTO, switched to ANSI function decls, and did some
minor fiddling.
|
|
|
|
|
|
| |
objects including instance objects.
The old API PyUnicode_FromObject() is still available as shortcut.
|
|
|
|
|
| |
corrected some usage of 'unsigned long' where Py_UNICODE
should have been used.
|
|
|
|
| |
true after revision 2.36 was checked in...
|
| |
|