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.
This commit is contained in:
stijn 2019-07-17 12:08:40 +02:00 committed by Damien George
parent a29334761d
commit 9da46a98cb

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)