mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +01:00
py/nlrx86,x64: Replace #define of defined() with portable macro usage.
Using gcc -Wpedantic will warn that #define of defined() is non-portable and this patch fixes this.
This commit is contained in:
@@ -34,7 +34,11 @@
|
||||
// x86-64 callee-save registers are:
|
||||
// rbx, rbp, rsp, r12, r13, r14, r15
|
||||
|
||||
#define NLR_OS_WINDOWS (defined(_WIN32) || defined(__CYGWIN__))
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
#define NLR_OS_WINDOWS 1
|
||||
#else
|
||||
#define NLR_OS_WINDOWS 0
|
||||
#endif
|
||||
|
||||
__attribute__((used)) unsigned int nlr_push_tail(nlr_buf_t *nlr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user