Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
8002d5d2
Commit
8002d5d2
authored
Sep 06, 2014
by
Damien George
Browse files
py: Fix definition of sys.maxsize with mpz changes.
parent
9a21d2e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/objint_mpz.c
View file @
8002d5d2
...
...
@@ -45,16 +45,18 @@
#if MICROPY_PY_SYS_MAXSIZE
// Export value for sys.maxsize
#define DIG_MASK ((1 << MPZ_DIG_SIZE) - 1)
#define DIG_MASK ((1
L
<< MPZ_DIG_SIZE) - 1)
STATIC
const
mpz_dig_t
maxsize_dig
[
MPZ_NUM_DIG_FOR_INT
]
=
{
(
INT_MAX
>>
MPZ_DIG_SIZE
*
0
)
&
DIG_MASK
,
#if (INT_MAX >> MPZ_DIG_SIZE * 0) > DIG_MASK
(
INT_MAX
>>
MPZ_DIG_SIZE
*
1
)
&
DIG_MASK
,
#if (INT_MAX >> MPZ_DIG_SIZE * 1) > DIG_MASK
(
INT_MAX
>>
MPZ_DIG_SIZE
*
2
)
&
DIG_MASK
,
#if (INT_MAX >> MPZ_DIG_SIZE * 2) > DIG_MASK
(
INT_MAX
>>
MPZ_DIG_SIZE
*
3
)
&
DIG_MASK
,
(
INT_MAX
>>
MPZ_DIG_SIZE
*
4
)
&
DIG_MASK
,
// (INT_MAX >> MPZ_DIG_SIZE * 5) & DIG_MASK,
#endif
#endif
};
const
mp_obj_int_t
mp_maxsize_obj
=
{
{
&
mp_type_int
},
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment