summaryrefslogtreecommitdiffstats
path: root/Include/pyport.h
Commit message (Collapse)AuthorAgeFilesLines
* Patch #1495999: Part two of Windows CE changes.Martin v. Löwis2006-06-101-4/+4
| | | | | | - update header checks, using autoconf - provide dummies for getenv, environ, and GetVersion - adjust MSC_VER check in socketmodule.c
* needforspeed: added Py_MEMCPY macro (currently tuned for Visual C only),Fredrik Lundh2006-05-281-0/+21
| | | | | and use it for string copy operations. this gives a 20% speedup on some string benchmarks.
* needforspeed: backed out the Py_LOCAL-isation of ceval; the massive in-Fredrik Lundh2006-05-271-8/+15
| | | | | lining killed performance on certain Intel boxes, and the "aggressive" macro itself gives most of the benefits on others.
* needforspeed: added PY_LOCAL_AGGRESSIVE macro to enable "aggressive"Fredrik Lundh2006-05-261-0/+8
| | | | LOCAL inlining; also added some missing whitespace
* use Py_LOCAL also for string and unicode objectsFredrik Lundh2006-05-261-2/+7
|
* needforspeed: added Py_LOCAL macro, based on the LOCAL macro usedFredrik Lundh2006-05-261-0/+17
| | | | | for SRE and others. applied Py_LOCAL to relevant portion of ceval, which gives a 1-2% speedup on my machine. ymmv.
* Fix incorrect documentation for the Py_IS_FINITE(X) macro.Kristján Valur Jónsson2006-05-251-3/+3
|
* Fix another typoAndrew M. Kuchling2006-05-251-1/+1
|
* Fix comment typosAndrew M. Kuchling2006-05-251-1/+1
|
* Added a new macro, Py_IS_FINITE(X). On windows there is an intrinsic for ↵Kristján Valur Jónsson2006-05-251-0/+9
| | | | this and it is more efficient than to use !Py_IS_INFINITE(X) && !Py_IS_NAN(X). No change on other platforms
* Patch #1492356: Port to Windows CE (patch set 1).Martin v. Löwis2006-05-221-0/+12
|
* Fixed error in comment for new PY_SSIZE_T_MIN.Tim Peters2006-04-051-1/+1
|
* Add PY_SSIZE_T_MIN, as suggested by Ralf W. Grosse-Kunstleve.Martin v. Löwis2006-04-051-0/+2
|
* Add a clause to the PY_FORMAT_SIZE_T to stop warnings on 32 bit intelAnthony Baxter2006-04-011-1/+3
| | | | | linux with gcc 4.0.2, after talking to Tim. <ymmit> But it won't break anything anywhere, so don't worry :-)
* Remove false information from the comment and reformat it like otherHye-Shik Chang2006-03-221-8/+6
| | | | comments in the file. (SF #1455641)
* Get Py_DEPRECATED to work with gcc 4.x tooNeal Norwitz2006-03-201-1/+2
|
* Introduced symbol PY_FORMAT_SIZE_T. See the new commentsTim Peters2006-03-171-0/+39
| | | | | in pyport.h. Changed PyString_FromFormatV() to use it instead of inlining its own maze of #if'ery.
* Fix intptr_t fallback for Py_ssize_t.Martin v. Löwis2006-02-181-1/+1
|
* Merge ssize_t branch.Martin v. Löwis2006-02-151-0/+9
|
* Remove INT_MIN that came from the AST merge.Neal Norwitz2005-10-211-1/+0
| | | | | | 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.
* Merge ast-branch to headJeremy Hylton2005-10-201-0/+1
| | | | | | | | | | 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.
* - Changes donated by Elemental Security to make it work on HP-UX 11 onGuido van Rossum2005-09-141-1/+1
| | | | Itanium2 with HP's 64-bit compiler (SF patch #1225212).
* Introduced a Py_IS_NAN macro, which probably works on the major platformsTim Peters2004-09-231-2/+17
| | | | | | 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.
* Add a workaround for a problem that UTF-8 strings can be corruptedHye-Shik Chang2004-08-041-0/+33
| | | | | | | 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.
* Moved SunPro warning suppression into pyport.h and out of individualNicholas Bastin2004-07-151-0/+7
| | | | modules and objects.
* Patch #871657: Set EDOM for `nan' return values on FreeBSD and OpenBSD.Hye-Shik Chang2004-03-221-7/+20
| | | | This fixes a problem that math.sqrt(-1) doesn't raise math.error.
* remove support for missing ANSI C header files (limits.h, stddef.h, etc).Skip Montanaro2004-02-101-2/+0
|
* Remove support for SunOS 4.Skip Montanaro2004-01-171-7/+0
| | | | Remove BAD_EXEC_PROTOYPE (leftover from IRIX 4 demolition).
* workaround for OpenBSD compiler bug w.r.t. handling of overflows.Anthony Baxter2003-09-301-1/+10
|
* Bug #794140: cygwin builds do not embedJason Tishler2003-09-041-1/+6
| | | | | | 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).
* This patch enables the building of Cygwin Python with a static coreJason Tishler2003-09-041-1/+2
| | | | | | | | | | | | | | | which still supports shared extensions. It takes advantage the latest Cygwin binutils (i.e., 20030901-1) which can export symbols from executables: http://cygwin.com/ml/cygwin-announce/2003-09/msg00002.html Additionally, it finally lays to rest the following mailing list subthread: http://mail.python.org/pipermail/python-list/2002-May/102500.html I tested the patch under Red Hat Linux 8.0 too
* Patch #734231: Update RiscOS support. In particular, correctMartin v. Löwis2003-05-101-0/+1
| | | | riscospath.extsep, and use os.extsep throughout.
* Rename LONG_LONG to PY_LONG_LONG. Fixes #710285.Martin v. Löwis2003-03-291-5/+5
|
* Make comments agree with code (I think).Michael W. Hudson2003-02-101-3/+4
|
* Patch #661760: Cygwin auto-import module patchJason Tishler2003-01-061-1/+5
| | | | | | | | | | | | The attached patch enables shared extension modules to build cleanly under Cygwin without moving the static initialization of certain function pointers (i.e., ones exported from the Python DLL core) to a module initialization function. Additionally, this patch fixes the modules that have been changed in the past to accommodate Cygwin.
* Apparently FreeBSD enables some HW floating-point exceptions by default.Tim Peters2002-12-281-5/+10
| | | | | | | This can cause core dumps when Python runs. Python relies on the 754- (and C99-) mandated default "non-stop" mode for FP exceptions. This patch from Ben Laurie disables at least one FP exception on FreeBSD at Python startup time.
* Update/correct commentNeal Norwitz2002-12-191-1/+1
|
* Provide mechanism to deprecate functions, types, and struct members.Neal Norwitz2002-12-191-0/+13
| | | | It would be nice to support other compilers besides gcc.
* Use Py_GCC_ATTRIBUTE instead of __attribute__. Compilers other than GCCNeil Schemenauer2002-09-151-1/+3
| | | | might use __attribute__ in other ways (e.g. CodeWarrior).
* Excise DL_IMPORT/EXPORT from object.h, and related files. This patchMark Hammond2002-07-291-3/+3
| | | | | also adds 'extern' to PyAPI_DATA rather than at each declaration, as discussed with Tim and Guido.
* Land Patch [ 566100 ] Rationalize DL_IMPORT and DL_EXPORT.Mark Hammond2002-07-191-22/+76
|
* Stop trying to cater to platforms with a broken HUGE_VAL definition. ItTim Peters2002-07-031-12/+7
| | | | | breaks other platforms (in this case, the hack for broken Cray systems in turn caused failure on a Mac system broken in a different way).
* Patch #555929: Cygwin AH_BOTTOM cleanup patch (*** version 2 ***)Jason Tishler2002-06-041-0/+10
| | | | | | | | | | | | This patch complies with the following request found near the top of configure.in: # This is for stuff that absolutely must end up in pyconfig.h. # Please use pyport.h instead, if possible. I tested this patch under Cygwin, Win32, and Red Hat Linux. Python built and ran successfully on each of these platforms.
* Back out #555929Martin v. Löwis2002-05-151-10/+0
|
* Patch #555929: Cygwin AH_BOTTOM cleanup patchJason Tishler2002-05-151-0/+10
| | | | | | | | | | | | This patch complies with the following request found near the top of configure.in: # This is for stuff that absolutely must end up in pyconfig.h. # Please use pyport.h instead, if possible. I tested this patch under Cygwin, Win32, and Red Hat Linux. Python built and ran successfully on each of these platforms.
* First stab at rationalizing the PyMem_ API. Mixing PyObject_xyz withTim Peters2002-04-121-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | PyMem_{Del, DEL} doesn't work yet (compilation problems). pyport.h: _PyMem_EXTRA is gone. pmem.h: Repaired comments. PyMem_{Malloc, MALLOC} and PyMem_{Realloc, REALLOC} now make the same x-platform guarantees when asking for 0 bytes, and when passing a NULL pointer to the latter. object.c: PyMem_{Malloc, Realloc} just call their macro versions now, since the latter take care of the x-platform 0 and NULL stuff by themselves now. pypcre.c, grow_stack(): So sue me. On two lines, this called PyMem_RESIZE to grow a "const" area. It's not legit to realloc a const area, so the compiler warned given the new expansion of PyMem_RESIZE. It would have gotten the same warning before if it had used PyMem_Resize() instead; the older macro version, but not the function version, silently cast away the constness. IMO that was a wrong thing to do, and the docs say the macro versions of PyMem_xyz are deprecated anyway. If somebody else is resizing const areas with the macro spelling, they'll get a warning when they recompile now too.
* Got rid of ifdefs for long-obsolete GUSI versions.Jack Jansen2002-04-111-7/+0
|
* SF bug 525705: [2.2] underflow raise OverflowException.Tim Peters2002-03-091-0/+35
| | | | | | | | | | | | | | | | | | | | Another year in the quest to out-guess random C behavior. Added macros Py_ADJUST_ERANGE1(X) and Py_ADJUST_ERANGE2(X, Y). The latter is useful for functions with complex results. Two corrections to errno- after-libm-call are attempted: 1. If the platform set errno to ERANGE due to underflow, clear errno. Some unknown subset of libm versions and link options do this. It's allowed by C89, but I never figured anyone would do it. 2. If the platform did not set errno but overflow occurred, force errno to ERANGE. C89 required setting errno to ERANGE, but C99 doesn't. Some unknown subset of libm versions and link options do it the C99 way now. Bugfix candidate, but hold off until some Linux people actually try it, with and without -lieee. I'll send a help plea to Python-Dev.
* Whether platform malloc(0) returns NULL has nothing to do with whetherTim Peters2002-03-021-2/+10
| | | | | | | | | | | platform realloc(p, 0) returns NULL, so MALLOC_ZERO_RETURNS_NULL can be correctly undefined yet realloc(p, 0) can return NULL anyway. Prevent realloc(p, 0) doing free(p) and returning NULL via a different hack. Would probably be better to get rid of MALLOC_ZERO_RETURNS_NULL entirely. Bugfix candidate.
* OS/2 EMX port changes (Include part of patch #450267):Andrew MacIntyre2002-02-261-0/+3
| | | | | | Include/ osdefs.h // EMX promotes Un*x path separators pyport.h