diff options
| author | stijn | 2019-07-17 12:08:40 +0200 |
|---|---|---|
| committer | Damien George | 2019-07-19 16:58:02 +1000 |
| commit | 9da46a98cbd20ea8cc48fc2378bf8092abd80795 (patch) | |
| tree | eb4e1a31edbc2abf736515381d81baae44efc68f | |
| parent | a29334761dc7b8eaf9f78611e3cd9033928b110c (diff) | |
windows/mpconfigport.h: Don't define restrict/inline/alignof for C++.
The C++ standard forbids redefining keywords, like inline and alignof, so
guard these definitions to avoid that, allowing to include the MicroPython
headers by C++ code.
| -rw-r--r-- | ports/windows/mpconfigport.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/windows/mpconfigport.h b/ports/windows/mpconfigport.h index 86e44183b..ffe7ae144 100644 --- a/ports/windows/mpconfigport.h +++ b/ports/windows/mpconfigport.h @@ -228,9 +228,11 @@ extern const struct _mp_obj_module_t mp_module_time; // CL specific definitions +#ifndef __cplusplus #define restrict #define inline __inline #define alignof(t) __alignof(t) +#endif #define PATH_MAX MICROPY_ALLOC_PATH_MAX #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) |
