LEFT | RIGHT |
1 #ifndef Py_PYPORT_H | 1 #ifndef Py_PYPORT_H |
2 #define Py_PYPORT_H | 2 #define Py_PYPORT_H |
3 | 3 |
4 #include "pyconfig.h" /* include for defines */ | 4 #include "pyconfig.h" /* include for defines */ |
5 | 5 |
6 #ifdef HAVE_STDINT_H | 6 #ifdef HAVE_STDINT_H |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #endif | 8 #endif |
9 | 9 |
10 /************************************************************************** | 10 /************************************************************************** |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 _Py_set_387controlword(new_387controlword); \ | 480 _Py_set_387controlword(new_387controlword); \ |
481 } while (0) | 481 } while (0) |
482 #define _Py_SET_53BIT_PRECISION_END \ | 482 #define _Py_SET_53BIT_PRECISION_END \ |
483 if (new_387controlword != old_387controlword) \ | 483 if (new_387controlword != old_387controlword) \ |
484 _Py_set_387controlword(old_387controlword) | 484 _Py_set_387controlword(old_387controlword) |
485 #else | 485 #else |
486 #define _Py_SET_53BIT_PRECISION_HEADER | 486 #define _Py_SET_53BIT_PRECISION_HEADER |
487 #define _Py_SET_53BIT_PRECISION_START | 487 #define _Py_SET_53BIT_PRECISION_START |
488 #define _Py_SET_53BIT_PRECISION_END | 488 #define _Py_SET_53BIT_PRECISION_END |
489 #endif | 489 #endif |
| 490 |
| 491 /* If we can't guarantee 53-bit precision, don't use the code |
| 492 in Python/dtoa.c, but fall back to standard code. This |
| 493 means that repr of a float will be long (17 sig digits). |
| 494 |
| 495 Realistically, there are two things that could go wrong: |
| 496 |
| 497 (1) doubles aren't IEEE 754 doubles, or |
| 498 (2) we're on x86 with the rounding precision set to 64-bits |
| 499 (extended precision), and we don't know how to change |
| 500 the rounding precision. |
| 501 */ |
| 502 |
| 503 #if !defined(DOUBLE_IS_LITTLE_ENDIAN_IEEE754) && \ |
| 504 !defined(DOUBLE_IS_BIG_ENDIAN_IEEE754) && \ |
| 505 !defined(DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754) |
| 506 #define PY_NO_SHORT_FLOAT_REPR |
| 507 #endif |
| 508 |
| 509 /* double rounding is symptomatic of use of extended precision on x86 */ |
| 510 #ifdef X87_DOUBLE_ROUNDING |
| 511 #define PY_NO_SHORT_FLOAT_REPR |
| 512 #endif |
| 513 |
490 | 514 |
491 /* Py_DEPRECATED(version) | 515 /* Py_DEPRECATED(version) |
492 * Declare a variable, type, or function deprecated. | 516 * Declare a variable, type, or function deprecated. |
493 * Usage: | 517 * Usage: |
494 * extern int old_var Py_DEPRECATED(2.3); | 518 * extern int old_var Py_DEPRECATED(2.3); |
495 * typedef int T1 Py_DEPRECATED(2.4); | 519 * typedef int T1 Py_DEPRECATED(2.4); |
496 * extern int x() Py_DEPRECATED(2.5); | 520 * extern int x() Py_DEPRECATED(2.5); |
497 */ | 521 */ |
498 #if defined(__GNUC__) && ((__GNUC__ >= 4) || \ | 522 #if defined(__GNUC__) && ((__GNUC__ >= 4) || \ |
499 (__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)) | 523 (__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)) |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
716 */ | 740 */ |
717 #ifndef Py_LL | 741 #ifndef Py_LL |
718 #define Py_LL(x) x##LL | 742 #define Py_LL(x) x##LL |
719 #endif | 743 #endif |
720 | 744 |
721 #ifndef Py_ULL | 745 #ifndef Py_ULL |
722 #define Py_ULL(x) Py_LL(x##U) | 746 #define Py_ULL(x) Py_LL(x##U) |
723 #endif | 747 #endif |
724 | 748 |
725 #endif /* Py_PYPORT_H */ | 749 #endif /* Py_PYPORT_H */ |
LEFT | RIGHT |