Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
80359aa9
Commit
80359aa9
authored
Apr 01, 2014
by
Dave Hylands
Browse files
Fix INT_BUF_SIZE to work with 32-bit and 64-bit
parent
51413c8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/pfenv.c
View file @
80359aa9
...
...
@@ -71,8 +71,9 @@ int pfenv_print_strn(const pfenv_t *pfenv, const char *str, unsigned int len, in
return
len
;
}
// enough room for 32 signed number
#define INT_BUF_SIZE (16)
// 32-bits is 10 digits, add 3 for commas, 1 for sign, 1 for terminating null
// We can use 16 characters for 32-bit and 32 characters for 64-bit
#define INT_BUF_SIZE (sizeof(machine_int_t) * 4)
int
pfenv_print_int
(
const
pfenv_t
*
pfenv
,
unsigned
int
x
,
int
sgn
,
int
base
,
int
base_char
,
int
flags
,
char
fill
,
int
width
)
{
char
sign
=
0
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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