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.
pull/1/head
stijn 2019-07-17 12:08:40 +02:00 committed by Damien George
parent a29334761d
commit 9da46a98cb
1 changed files with 2 additions and 0 deletions

View File

@ -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)