| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
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...
|
| |
|
|
|
|
| |
should have been used.
|
|
|
|
| |
into 1000-case smaller ones.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Full_Name: Bastian Kleineidam
Version: 2.0b1 CVS 5.7.2000
OS: Debian Linux 2.2
Submission from: earth.cs.uni-sb.de (134.96.252.92)
|
|
|
|
| |
to the new alphabetic lookup APIs in unicodectype.c.
|
|
|
|
| |
i.e the ones with category 'Ll','Lu','Lt','Lo','Lm'.
|
|
|
|
|
| |
ones on the Unicode objects. Note that the string versions use
the (locale aware) C lib APIs isalpha() and isalnum().
|
|
|
|
|
|
|
| |
implementation. This was really to test whether my new CVS+SSH
setup is more usable than the old one -- and turns out it is (for
whatever reason, it was impossible to do a commit before that
involved more than one directory).
|
|
|
|
|
| |
Make unicode_compare a true UTF-16 compare function (includes
support for surrogates).
|
|
|
|
| |
This is now checked and the error passed on to the caller.
|
|
|
|
| |
to 8-bit strings, using the default encoding.
|