Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
c90c0f68
Commit
c90c0f68
authored
11 years ago
by
Paul Sokolovsky
Browse files
Options
Downloads
Patches
Plain Diff
Move INT_FMT, etc. declaration into global mpconfig.h .
This in particular makes it available for stm port.
parent
b7aa7271
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
py/mpconfig.h
+14
-0
14 additions, 0 deletions
py/mpconfig.h
unix-cpy/mpconfigport.h
+0
-4
0 additions, 4 deletions
unix-cpy/mpconfigport.h
unix/mpconfigport.h
+0
-4
0 additions, 4 deletions
unix/mpconfigport.h
with
14 additions
and
8 deletions
py/mpconfig.h
+
14
−
0
View file @
c90c0f68
...
@@ -4,6 +4,20 @@
...
@@ -4,6 +4,20 @@
#include
<mpconfigport.h>
#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
// Any options not explicitly set in mpconfigport.h will get default
// values below.
// values below.
...
...
This diff is collapsed.
Click to expand it.
unix-cpy/mpconfigport.h
+
0
−
4
View file @
c90c0f68
...
@@ -11,15 +11,11 @@
...
@@ -11,15 +11,11 @@
#ifdef __LP64__
#ifdef __LP64__
typedef
long
machine_int_t
;
// must be pointer size
typedef
long
machine_int_t
;
// must be pointer size
typedef
unsigned
long
machine_uint_t
;
// must be pointer size
typedef
unsigned
long
machine_uint_t
;
// must be pointer size
#define UINT_FMT "%lu"
#define INT_FMT "%ld"
#else
#else
// These are definitions for machines where sizeof(int) == sizeof(void*),
// These are definitions for machines where sizeof(int) == sizeof(void*),
// regardless for actual size.
// regardless for actual size.
typedef
int
machine_int_t
;
// must be pointer size
typedef
int
machine_int_t
;
// must be pointer size
typedef
unsigned
int
machine_uint_t
;
// must be pointer size
typedef
unsigned
int
machine_uint_t
;
// must be pointer size
#define UINT_FMT "%u"
#define INT_FMT "%d"
#endif
#endif
#define BYTES_PER_WORD sizeof(machine_int_t)
#define BYTES_PER_WORD sizeof(machine_int_t)
...
...
This diff is collapsed.
Click to expand it.
unix/mpconfigport.h
+
0
−
4
View file @
c90c0f68
...
@@ -11,15 +11,11 @@
...
@@ -11,15 +11,11 @@
#ifdef __LP64__
#ifdef __LP64__
typedef
long
machine_int_t
;
// must be pointer size
typedef
long
machine_int_t
;
// must be pointer size
typedef
unsigned
long
machine_uint_t
;
// must be pointer size
typedef
unsigned
long
machine_uint_t
;
// must be pointer size
#define UINT_FMT "%lu"
#define INT_FMT "%ld"
#else
#else
// These are definitions for machines where sizeof(int) == sizeof(void*),
// These are definitions for machines where sizeof(int) == sizeof(void*),
// regardless for actual size.
// regardless for actual size.
typedef
int
machine_int_t
;
// must be pointer size
typedef
int
machine_int_t
;
// must be pointer size
typedef
unsigned
int
machine_uint_t
;
// must be pointer size
typedef
unsigned
int
machine_uint_t
;
// must be pointer size
#define UINT_FMT "%u"
#define INT_FMT "%d"
#endif
#endif
#define BYTES_PER_WORD sizeof(machine_int_t)
#define BYTES_PER_WORD sizeof(machine_int_t)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment