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
33b50a02
Commit
33b50a02
authored
Sep 06, 2014
by
Damien George
Browse files
Merge branch 'master' of github.com:micropython/micropython
parents
c7a79284
78fde481
Changes
4
Hide whitespace changes
Inline
Side-by-side
py/binary.c
View file @
33b50a02
...
...
@@ -58,6 +58,8 @@ int mp_binary_get_size(char struct_type, char val_type, mp_uint_t *palign) {
size
=
4
;
break
;
case
'q'
:
case
'Q'
:
size
=
8
;
break
;
case
'P'
:
case
'O'
:
case
'S'
:
size
=
sizeof
(
void
*
);
break
;
}
break
;
case
'@'
:
{
...
...
py/mpconfig.h
View file @
33b50a02
...
...
@@ -448,6 +448,10 @@ typedef double mp_float_t;
#define MP_PLAT_FREE_EXEC(ptr, size) m_del(byte, ptr, size)
#endif
#ifndef MP_SSIZE_MAX
#define MP_SSIZE_MAX SSIZE_MAX
#endif
// printf format spec to use for mp_int_t and friends
#ifndef INT_FMT
#ifdef __LP64__
...
...
py/objint_longlong.c
View file @
33b50a02
...
...
@@ -52,7 +52,7 @@
#if MICROPY_PY_SYS_MAXSIZE
// Export value for sys.maxsize
const
mp_obj_int_t
mp_maxsize_obj
=
{{
&
mp_type_int
},
INT
_MAX
};
const
mp_obj_int_t
mp_maxsize_obj
=
{{
&
mp_type_int
},
MP_SSIZE
_MAX
};
#endif
mp_int_t
mp_obj_int_hash
(
mp_obj_t
self_in
)
{
...
...
py/objint_mpz.c
View file @
33b50a02
...
...
@@ -47,14 +47,14 @@
// Export value for sys.maxsize
#define DIG_MASK ((1L << 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
,
(
INT
_MAX
>>
MPZ_DIG_SIZE
*
3
)
&
DIG_MASK
,
(
INT
_MAX
>>
MPZ_DIG_SIZE
*
4
)
&
DIG_MASK
,
// (
INT
_MAX >> MPZ_DIG_SIZE * 5) & DIG_MASK,
(
MP_SSIZE
_MAX
>>
MPZ_DIG_SIZE
*
0
)
&
DIG_MASK
,
#if (
MP_SSIZE
_MAX >> MPZ_DIG_SIZE * 0) > DIG_MASK
(
MP_SSIZE
_MAX
>>
MPZ_DIG_SIZE
*
1
)
&
DIG_MASK
,
#if (
MP_SSIZE
_MAX >> MPZ_DIG_SIZE * 1) > DIG_MASK
(
MP_SSIZE
_MAX
>>
MPZ_DIG_SIZE
*
2
)
&
DIG_MASK
,
(
MP_SSIZE
_MAX
>>
MPZ_DIG_SIZE
*
3
)
&
DIG_MASK
,
(
MP_SSIZE
_MAX
>>
MPZ_DIG_SIZE
*
4
)
&
DIG_MASK
,
// (
MP_SSIZE
_MAX >> MPZ_DIG_SIZE * 5) & DIG_MASK,
#endif
#endif
};
...
...
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