| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
The ob_sval member of a string object isn't necessarily aligned to better
than a native long, so the new "q" and "Q" struct codes can't get away w/
casting tricks on platforms where LONG_LONG requires stricter-than-long
alignment. After I thought of a few elaborate workarounds, Guido bashed
me over the head with the obvious memcpy approach, herewith implemented.
|
|
|
|
| |
information. (I found this idea in the ActivePython 2.1 diffs.)
|
| |
|
|
|
|
|
| |
"A" out of the internal abbreviations. For published functions with
"ast" in their names, make alternate offerings using just "st".
|
|
|
|
|
|
| |
Add some casts to quiet warnings from an unspecified non-GCC compiler.
This closes SF patch #436258.
|
|
|
|
| |
(Should be merged with descr branch.)
|
|
|
|
| |
is a 2.1.1 candidate, if it isn't too late for that.
|
|
|
|
|
|
| |
Check for slice/item deletion, which calls slice/item assignment with a NULL
value, and raise a TypeError instead of coredumping. Bugreport and suggested
fix by Alex Martelli.
|
|
|
|
|
|
|
|
|
|
| |
that info to code dynamically compiled *by* code compiled with generators
enabled. Doesn't yet work because there's still no way to tell the parser
that "yield" is OK (unlike nested_scopes, the parser has its fingers in
this too).
Replaced PyEval_GetNestedScopes by a more-general
PyEval_MergeCompilerFlags. Perhaps I should not have? I doubted it was
*intended* to be part of the public API, so just did.
|
| |
|
|
|
|
| |
Others: Remove redundant includes of assert.h.
|
|
|
|
|
|
| |
Include sys/poll.h if it was found by the configure script. The OpenGroup
spec says poll.h is the correct header file to use, so that file is
preferred.
|
|
|
|
|
| |
newwin() wrapper to always return a window, and never a pad. This makes
the code match the documentation.
|
|
|
|
|
|
|
| |
Also note that it isn't just Linux nice() that is broken: at least FreeBSD
and BSDI also have this problem. os.nice() should probably just be emulated
using getpriority()/setpriority(), if they are available, but I'll get to
that later.
|
|
|
|
|
|
|
| |
Work around Linux's nonstandard nice() systemcall, which does not return the
new priority.
This closes SF bug #439990.
|
|
|
|
|
|
|
| |
This patch allows the readline module to build cleanly with GNU
readline 4.2 without breaking the build for earlier GNU readline
versions. The configure script checks for the presence of
rl_completion_matches in libreadline.
|
|
|
|
| |
return NULL in an error case was itself an error.
|
|
|
|
| |
(if any.)
|
| |
|
|
|
|
|
| |
added copy/deepcopy support to SRE (still not enabled, since it's not
covered by the test suite)
|
|
|
|
|
| |
ch is unsigned, so testing for negative values doesn't make
sense (as noticed by the OpenVMS compiler)
|
|
|
|
|
| |
sure about this one, but test #133283 now works even with the fix in
place, and so does the test suite. we'll see what comes up...
|
| |
|
|
|
|
| |
speedups for certain unicode character ranges.
|
| |
|
|
|
|
| |
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.
|
| |
|