Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(44544)

Side by Side Diff: Include/longintrepr.h

Issue 7652: Merge C version of decimal into py3k.
Patch Set: Created 7 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Doc/library/numeric.rst ('k') | Lib/decimal.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #ifndef Py_LIMITED_API 1 #ifndef Py_LIMITED_API
2 #ifndef Py_LONGINTREPR_H 2 #ifndef Py_LONGINTREPR_H
3 #define Py_LONGINTREPR_H 3 #define Py_LONGINTREPR_H
4 #ifdef __cplusplus 4 #ifdef __cplusplus
5 extern "C" { 5 extern "C" {
6 #endif 6 #endif
7 7
8 8
9 /* This is published for the benefit of "friend" marshal.c only. */ 9 /* This is published for the benefit of "friends" marshal.c and _decimal.c. */
10 10
11 /* Parameters of the long integer representation. There are two different 11 /* Parameters of the long integer representation. There are two different
12 sets of parameters: one set for 30-bit digits, stored in an unsigned 32-bit 12 sets of parameters: one set for 30-bit digits, stored in an unsigned 32-bit
13 integer type, and one set for 15-bit digits with each digit stored in an 13 integer type, and one set for 15-bit digits with each digit stored in an
14 unsigned short. The value of PYLONG_BITS_IN_DIGIT, defined either at 14 unsigned short. The value of PYLONG_BITS_IN_DIGIT, defined either at
15 configure time or in pyport.h, is used to decide which digit size to use. 15 configure time or in pyport.h, is used to decide which digit size to use.
16 16
17 Type 'digit' should be able to hold 2*PyLong_BASE-1, and type 'twodigits' 17 Type 'digit' should be able to hold 2*PyLong_BASE-1, and type 'twodigits'
18 should be an unsigned integer type able to hold all integers up to 18 should be an unsigned integer type able to hold all integers up to
19 PyLong_BASE*PyLong_BASE-1. x_sub assumes that 'digit' is an unsigned type, 19 PyLong_BASE*PyLong_BASE-1. x_sub assumes that 'digit' is an unsigned type,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 PyAPI_FUNC(PyLongObject *) _PyLong_New(Py_ssize_t); 94 PyAPI_FUNC(PyLongObject *) _PyLong_New(Py_ssize_t);
95 95
96 /* Return a copy of src. */ 96 /* Return a copy of src. */
97 PyAPI_FUNC(PyObject *) _PyLong_Copy(PyLongObject *src); 97 PyAPI_FUNC(PyObject *) _PyLong_Copy(PyLongObject *src);
98 98
99 #ifdef __cplusplus 99 #ifdef __cplusplus
100 } 100 }
101 #endif 101 #endif
102 #endif /* !Py_LONGINTREPR_H */ 102 #endif /* !Py_LONGINTREPR_H */
103 #endif /* Py_LIMITED_API */ 103 #endif /* Py_LIMITED_API */
OLDNEW
« no previous file with comments | « Doc/library/numeric.rst ('k') | Lib/decimal.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+