Mark Dickinson
f35f8044e4
Rewrite Py_ARITHMETIC_RIGHT_SHIFT so that it's valid for all signed
...
integer types T, not just those for which "unsigned T" is legal.
2009-03-20 23:16:14 +00:00
Mark Dickinson
efc82f7e8e
Issue #4258 : Use 30-bit digits for Python longs, on 64-bit platforms.
...
Backport of r70459.
2009-03-20 15:51:55 +00:00
Jeffrey Yasskin
d89f5b20b2
Fix issue 4884, preventing a crash in the socket code when python is compiled
...
with llvm-gcc and run with a glibc <2.10.
2009-01-09 16:47:07 +00:00
Gregory P. Smith
9d53457e59
Merge in release25-maint r60793:
...
Added checks for integer overflows, contributed by Google. Some are
only available if asserts are left in the code, in cases where they
can't be triggered from Python code.
2008-06-11 07:41:16 +00:00
Gregory P. Smith
dd96db63f6
This reverts r63675 based on the discussion in this thread:
...
http://mail.python.org/pipermail/python-dev/2008-June/079988.html
Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names
in the spirit of 3.0 are available via a #define only. See the email thread.
2008-06-09 04:58:54 +00:00
Christian Heimes
593daf545b
Renamed PyString to PyBytes
2008-05-26 12:51:38 +00:00
Martin v. Löwis
8c255e4173
Patch #1722225 : Support QNX 6.
2008-05-23 15:06:50 +00:00
Christian Heimes
6f34109384
I finally got the time to update and merge Mark's and my trunk-math branch. The patch is collaborated work of Mark Dickinson and me. It was mostly done a few months ago. The patch fixes a lot of loose ends and edge cases related to operations with NaN, INF, very small values and complex math.
...
The patch also adds acosh, asinh, atanh, log1p and copysign to all platforms. Finally it fixes differences between platforms like different results or exceptions for edge cases. Have fun :)
2008-04-18 23:13:07 +00:00
Christian Heimes
951cc0f474
Fixed bug #1983 : Return from fork() is pid_t, not int
2008-01-31 23:08:23 +00:00
Christian Heimes
690c91220e
Fixed a missing (X) in define
2008-01-22 15:01:25 +00:00
Christian Heimes
487235109b
Fixed a wrong assumption in configure.in and Include/pyport.h. The is finite function is not called isfinite() but finite(). Sorry, my fault. :)
2008-01-20 14:28:28 +00:00
Christian Heimes
0a83d79268
Some build bots don't compile mathmodule. There is an issue with the long definition of pi and euler
2008-01-03 21:14:48 +00:00
Christian Heimes
0a8143f646
Applied patch #1635 : Float patch for inf and nan on Windows (and other platforms).
...
The patch unifies float("inf") and repr(float("inf")) on all platforms.
2007-12-18 23:22:54 +00:00
Martin v. Löwis
2a71a47c95
Provide PY_LLONG_MAX on all systems having long long.
...
Will backport to 2.5.
2007-06-13 03:42:19 +00:00
Martin v. Löwis
9201e7f1a6
Provide LLONG_MAX for S390.
2007-06-09 10:10:26 +00:00
Martin v. Löwis
6371cd8177
Patch #1733960 : Allow T_LONGLONG to accept ints.
...
Will backport to 2.5.
2007-06-09 07:42:52 +00:00
Martin v. Löwis
aac1316222
Add check for the PyArg_ParseTuple format, and declare
...
it if it is supported.
2006-10-19 10:58:46 +00:00
Martin v. Löwis
40e9aed050
Guard uintptr_t test with HAVE_STDINT_H, test for
...
stdint.h. Will backport.
2006-10-02 15:20:37 +00:00
Neal Norwitz
02743ca014
Mostly revert this file to the same version as before. Only force setting
...
of PY_FORMAT_SIZE_T to "l" for Mac OSX. I don't know a better define
to use. This should get rid of the warnings on other platforms and Mac too.
2006-09-22 08:47:23 +00:00
Neal Norwitz
4a8fbdb1b2
Fix %zd string formatting on Mac OS X so it prints negative numbers.
...
In addition to testing positive numbers, verify negative numbers work in configure.
In order to avoid compiler warnings on OS X 10.4, also change the order of the check
for the format character to use (PY_FORMAT_SIZE_T) in the sprintf format
for Py_ssize_t. This patch changes PY_FORMAT_SIZE_T from "" to "l" if it wasn't
defined at configure time. Need to verify the buildbot results.
Backport candidate (if everyone thinks this patch can't be improved).
2006-09-22 08:16:26 +00:00
Martin v. Löwis
0e8bd7e1cc
Patch #1495999 : Part two of Windows CE changes.
...
- update header checks, using autoconf
- provide dummies for getenv, environ, and GetVersion
- adjust MSC_VER check in socketmodule.c
2006-06-10 12:23:46 +00:00
Fredrik Lundh
80f8e80c15
needforspeed: added Py_MEMCPY macro (currently tuned for Visual C only),
...
and use it for string copy operations. this gives a 20% speedup on some
string benchmarks.
2006-05-28 12:06:46 +00:00
Fredrik Lundh
7a83089c06
needforspeed: backed out the Py_LOCAL-isation of ceval; the massive in-
...
lining killed performance on certain Intel boxes, and the "aggressive"
macro itself gives most of the benefits on others.
2006-05-27 10:39:48 +00:00
Fredrik Lundh
57640f5c57
needforspeed: added PY_LOCAL_AGGRESSIVE macro to enable "aggressive"
...
LOCAL inlining; also added some missing whitespace
2006-05-26 11:54:04 +00:00
Fredrik Lundh
95e2a91615
use Py_LOCAL also for string and unicode objects
2006-05-26 11:38:15 +00:00
Fredrik Lundh
b8b3c8e276
needforspeed: added Py_LOCAL macro, based on the LOCAL macro used
...
for SRE and others. applied Py_LOCAL to relevant portion of ceval,
which gives a 1-2% speedup on my machine. ymmv.
2006-05-26 11:29:39 +00:00
Kristján Valur Jónsson
44aa9f7139
Fix incorrect documentation for the Py_IS_FINITE(X) macro.
2006-05-25 16:39:27 +00:00
Andrew M. Kuchling
cc1ecf4d6d
Fix another typo
2006-05-25 16:34:54 +00:00
Andrew M. Kuchling
1d2576dbf0
Fix comment typos
2006-05-25 16:23:15 +00:00
Kristján Valur Jónsson
f94323fbb4
Added a new macro, Py_IS_FINITE(X). On windows there is an intrinsic for this and it is more efficient than to use !Py_IS_INFINITE(X) && !Py_IS_NAN(X). No change on other platforms
2006-05-25 15:53:30 +00:00
Martin v. Löwis
a43190bc78
Patch #1492356 : Port to Windows CE (patch set 1).
2006-05-22 09:15:18 +00:00
Tim Peters
3b1c01d4b6
Fixed error in comment for new PY_SSIZE_T_MIN.
2006-04-05 18:43:30 +00:00
Martin v. Löwis
c48c8db110
Add PY_SSIZE_T_MIN, as suggested by Ralf W. Grosse-Kunstleve.
2006-04-05 18:21:17 +00:00
Anthony Baxter
c7403ed183
Add a clause to the PY_FORMAT_SIZE_T to stop warnings on 32 bit intel
...
linux with gcc 4.0.2, after talking to Tim.
<ymmit> But it won't break anything anywhere, so don't worry :-)
2006-04-01 01:08:29 +00:00
Hye-Shik Chang
f303261cf0
Remove false information from the comment and reformat it like other
...
comments in the file. (SF #1455641 )
2006-03-22 08:52:43 +00:00
Neal Norwitz
3dd8be414e
Get Py_DEPRECATED to work with gcc 4.x too
2006-03-20 06:33:01 +00:00
Tim Peters
ae1d0c978d
Introduced symbol PY_FORMAT_SIZE_T. See the new comments
...
in pyport.h. Changed PyString_FromFormatV() to use it
instead of inlining its own maze of #if'ery.
2006-03-17 03:29:34 +00:00
Martin v. Löwis
2d65b5542b
Fix intptr_t fallback for Py_ssize_t.
2006-02-18 18:26:55 +00:00
Martin v. Löwis
18e165558b
Merge ssize_t branch.
2006-02-15 17:27:45 +00:00
Neal Norwitz
358d938aaa
Remove INT_MIN that came from the AST merge.
...
INT_MIN is used in Python/compile.c, but it was also used
in Objects/abstract.c Python/getargs.c. If we need it for compile.c,
we can get it from the same place as the other files.
2005-10-21 04:33:02 +00:00
Jeremy Hylton
3e0055f8c6
Merge ast-branch to head
...
This change implements a new bytecode compiler, based on a
transformation of the parse tree to an abstract syntax defined in
Parser/Python.asdl.
The compiler implementation is not complete, but it is in stable
enough shape to run the entire test suite excepting two disabled
tests.
2005-10-20 19:59:25 +00:00
Guido van Rossum
539c662f10
- Changes donated by Elemental Security to make it work on HP-UX 11 on
...
Itanium2 with HP's 64-bit compiler (SF patch #1225212 ).
2005-09-14 17:49:54 +00:00
Tim Peters
862f0593d8
Introduced a Py_IS_NAN macro, which probably works on the major platforms
...
today. pyconfig.h can override it if not, and can also override
Py_IS_INFINITY now. Py_IS_NAN and Py_IS_INFINITY are overridden now
for Microsoft compilers, using efficient MS-specific spellings.
2004-09-23 19:11:32 +00:00
Hye-Shik Chang
b5047fd019
Add a workaround for a problem that UTF-8 strings can be corrupted
...
or broken by basic ctype functions in 4.4BSD descendants. This
will be fixed in their future development branches but they'll keep
the POSIX-incompatibility for their backward-compatiblities in near
future.
2004-08-04 06:33:51 +00:00
Nicholas Bastin
9ba301e589
Moved SunPro warning suppression into pyport.h and out of individual
...
modules and objects.
2004-07-15 15:54:05 +00:00
Hye-Shik Chang
77d9a3effa
Patch #871657 : Set EDOM for `nan' return values on FreeBSD and OpenBSD.
...
This fixes a problem that math.sqrt(-1) doesn't raise math.error.
2004-03-22 08:43:55 +00:00
Skip Montanaro
7befb9966e
remove support for missing ANSI C header files (limits.h, stddef.h, etc).
2004-02-10 16:50:21 +00:00
Skip Montanaro
ce59c04127
Remove support for SunOS 4.
...
Remove BAD_EXEC_PROTOYPE (leftover from IRIX 4 demolition).
2004-01-17 14:19:44 +00:00
Anthony Baxter
83dd43fde1
workaround for OpenBSD compiler bug w.r.t. handling of overflows.
2003-09-30 14:58:59 +00:00
Jason Tishler
6bc06eca70
Bug #794140 : cygwin builds do not embed
...
The embed2.diff patch solves the user's problem by exporting the missing
symbols from the Python core so Python can be embedded in another Cygwin
application (well, at lest vim).
2003-09-04 11:59:50 +00:00