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
892af61d
Commit
892af61d
authored
Jan 03, 2014
by
Damien George
Browse files
Merge pull request #56 from pfalcon/int_fmt-global
Move INT_FMT, etc. declaration into global mpconfig.h .
parents
b7aa7271
c90c0f68
Changes
3
Hide whitespace changes
Inline
Side-by-side
py/mpconfig.h
View file @
892af61d
...
...
@@ -4,6 +4,20 @@
#include <mpconfigport.h>
#ifndef INT_FMT
// printf format spec to use for machine_int_t and friends
#ifdef __LP64__
// Archs where machine_int_t == long, long != int
#define UINT_FMT "%lu"
#define INT_FMT "%ld"
#else
// Archs where machine_int_t == int
#define UINT_FMT "%u"
#define INT_FMT "%d"
#endif
#endif //INT_FMT
// Any options not explicitly set in mpconfigport.h will get default
// values below.
...
...
unix-cpy/mpconfigport.h
View file @
892af61d
...
...
@@ -11,15 +11,11 @@
#ifdef __LP64__
typedef
long
machine_int_t
;
// must be pointer size
typedef
unsigned
long
machine_uint_t
;
// must be pointer size
#define UINT_FMT "%lu"
#define INT_FMT "%ld"
#else
// These are definitions for machines where sizeof(int) == sizeof(void*),
// regardless for actual size.
typedef
int
machine_int_t
;
// must be pointer size
typedef
unsigned
int
machine_uint_t
;
// must be pointer size
#define UINT_FMT "%u"
#define INT_FMT "%d"
#endif
#define BYTES_PER_WORD sizeof(machine_int_t)
...
...
unix/mpconfigport.h
View file @
892af61d
...
...
@@ -11,15 +11,11 @@
#ifdef __LP64__
typedef
long
machine_int_t
;
// must be pointer size
typedef
unsigned
long
machine_uint_t
;
// must be pointer size
#define UINT_FMT "%lu"
#define INT_FMT "%ld"
#else
// These are definitions for machines where sizeof(int) == sizeof(void*),
// regardless for actual size.
typedef
int
machine_int_t
;
// must be pointer size
typedef
unsigned
int
machine_uint_t
;
// must be pointer size
#define UINT_FMT "%u"
#define INT_FMT "%d"
#endif
#define BYTES_PER_WORD sizeof(machine_int_t)
...
...
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