| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
tests.
|
|
|
|
|
|
| |
SIZEOF_SHORT by hand here.
Also added dynamic check that SIZEOF_SHORT is correct for the platform (in
_testcapimodule).
|
|
|
|
|
|
| |
unicodeobject.h, which forces sizeof(Py_UNICODE) == sizeof(Py_UCS4).
(this may be good enough for platforms that doesn't have a 16-bit
type. the UTF-16 codecs don't work, though)
|
|
|
|
| |
HAVE_USABLE_WCHAR_T
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
because I need to make progress and don't have time now to think about
whatever it is the new code is trying to accomplish.
|
| |
|
| |
|
|
|
|
|
| |
Contributed by Jun-ichiro "itojun" Hagino. get{addr,name}info emulation
code taken from WIDE.
|
|
|
|
|
|
| |
PyArg_ParseTuple() call.
(2.1.1 bugfix candidate.)
|
| |
|
|
|
|
| |
the need for the F_ERROR macro.
|
|
|
|
|
|
| |
Protect several more uses of constants with #ifdefs; these are necessary on
(at least) SCO OpenServer 5. Fixes a non-SF-submitted bugreport by Michael
Kent.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
the new PyLong_{As,From}{Unsigned,}LongLong tests, so the bulk of the
code is in the new #include file testcapi_long.h, which generates
different code depending on how macros are set. This sucks, but I couldn't
think of anything that sucked less.
UNIX headache? If we still maintain dependencies by hand, someone who
knows what they're doing should teach whatever needs it that
_testcapimodule.c includes testcapi_long.h.
|
|
|
|
| |
Repaired that, and added appropriate tests for it to test_struct.py.
|
|
|
|
|
|
|
|
|
|
|
| |
Replaced PyLong_{As,From}{Unsigned,}LongLong guts with calls
to _PyLong_{As,From}ByteArray.
_testcapimodule.c:
Added strong tests of PyLong_{As,From}{Unsigned,}LongLong.
Fixes SF bug #432552 PyLong_AsLongLong() problems.
Possible bugfix candidate, but the fix relies on code added to longobject
to support the new q/Q structmodule format codes.
|
|
|
|
|
|
|
|
|
|
| |
functions. I intend to replace their guts with calls to the new
_PyLong_{As,From}ByteArray() functions, but AFAICT there's no tests for
them at all now; I also suspect PyLong_AsLongLong() isn't catching all
overflow cases, but without a std test to demonstrate that why should you
believe me <wink>.
Also added a raiseTestError() utility function.
|
|
|
|
| |
still set to python2.0 ...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This completes the q/Q project.
longobject.c _PyLong_AsByteArray: The original code had a gross bug:
the most-significant Python digit doesn't necessarily have SHIFT
significant bits, and you really need to count how many copies of the sign
bit it has else spurious overflow errors result.
test_struct.py: This now does exhaustive std q/Q testing at, and on both
sides of, all relevant power-of-2 boundaries, both positive and negative.
NEWS: Added brief dict news while I was at it.
|
| |
|
|
|
|
| |
in native mode on platforms that don't HAVE_LONG_LONG.
|
|
|
|
|
|
| |
not just to alignment. Spotted by Guido.
Bugfix candidate.
|
|
|
|
| |
on (some versions of ?) AIX.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
native mode, and only when config #defines HAVE_LONG_LONG. Standard mode
will eventually treat them as 8-byte ints across all platforms, but that
likely requires a new set of routines in longobject.c first (while
sizeof(long) >= 4 is guaranteed by C, there's nothing in C we can rely
on x-platform to hold 8 bytes of int, so we'll have to roll our own;
I'm thinking of a simple pair of conversion functions, Python long
to/from sized vector of unsigned bytes; that may be useful for GMP
conversions too; std q/Q would call them with size fixed at 8).
test_struct.py: In addition to adding some native-mode 'q' and 'Q' tests,
got rid of unused code, and repaired a non-portable assumption about
native sizeof(short) (it isn't 2 on some Cray boxes).
libstruct.tex: In addition to adding a bit of 'q'/'Q' docs (more needed
later), removed an erroneous footnote about 'I' behavior.
|
| |
|
| |
|
|
|
|
| |
(Just a change to a comment)
|
|
|
|
| |
directives, which is the role of CPPFLAGS. Closes SF patch #414991.
|
|
|
|
| |
_PyTuple_Resize().
|
|
|
|
| |
ought to be faster.
|
|
|
|
|
|
| |
when #ifdef was needed.
This closes (reallu!) SF bug #417418.
|
| |
|
|
|
|
|
|
|
|
|
| |
*are* obsolete; three variables and the maketrans() function are not
(yet) obsolete.
Add a compensating warnings.filterwarnings() call to test_strop.py.
Add this to the NEWS.
|
|
|
|
|
|
|
|
| |
return a (C) long: PyArg_ParseTuple and Py_BuildValue may not let us get
at the size_t we really want, but C int is clearly too small for a 64-bit
box, and both the start parameter and the return value should work for
large mapped files even on 32-bit boxes. The code really needs to be
rethought from scratch (not by me, though ...).
|
| |
|
| |
|
|
|
|
| |
fileobject.h, and initialize it in bltinmodule.
|
|
|
|
|
|
|
|
|
|
| |
1) it didn't obey the "start" parameter (and when it does, we must validate
the value)
2) the return value needs to be an absolute index, rather than relative to
some arbitrary point in the file
(checking CVS, it appears this method never worked; these changes bring it
into line with typical .find() behavior)
|
|
|
|
| |
dealing with the file system. As discussed on python-dev and in patch 410465.
|
|
|
|
|
|
| |
When getting a string buffer for a string we just created, use
PyString_AS_STRING() instead of PyString_AsString() to avoid the
call overhead and extra type check.
|
|
|
|
|
|
|
|
| |
constants used by other macros from the headers.
Conditionalize VREPRINT and VDISCARD; these are not available on HP-UX.
This closes bug #417418.
|
|
|
|
| |
module for useful constants.
|
|
|
|
|
|
|
| |
meaning infinity -- but at least warn about it in the code! I pissed
away a couple hours on this today, and don't wish the same on the next
in line.
Bugfix candidate.
|
|
|
|
|
|
|
| |
means "replace everything". But the string module, string.replace()
amd test_string.py believe a 0 count means "replace nothing".
"Nothing" wins, strop loses.
Bugfix candidate.
|
|
|
|
|
|
| |
out of synch than I realized, and I managed to break replace's "count"
argument when it was 0. All is well again. Maybe.
Bugfix candidate.
|