mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
NuttX implements a function with the same name which may end up being included whenever `CONFIG_MM_KERNEL_HEAP` is set. To avoid it, insert a prefix to it on Python's implementation. Please note that the other patches had their metadata updated too.
26 lines
1 KiB
Diff
26 lines
1 KiB
Diff
From deadd332eda6355c6598dc9df5f12b34b870d857 Mon Sep 17 00:00:00 2001
|
|
From: Tiago Medicci <tiago.medicci@espressif.com>
|
|
Date: Tue, 10 Dec 2024 12:03:47 -0300
|
|
Subject: [PATCH 11/14] avoid redefinition warning if UNUSED is already defined
|
|
|
|
---
|
|
Parser/pegen.h | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/Parser/pegen.h b/Parser/pegen.h
|
|
index 32c64e7774b..42574456f23 100644
|
|
--- a/Parser/pegen.h
|
|
+++ b/Parser/pegen.h
|
|
@@ -250,7 +250,9 @@ void * _PyPegen_seq_last_item(asdl_seq *seq);
|
|
#define PyPegen_last_item(seq, type) ((type)_PyPegen_seq_last_item((asdl_seq*)seq))
|
|
void * _PyPegen_seq_first_item(asdl_seq *seq);
|
|
#define PyPegen_first_item(seq, type) ((type)_PyPegen_seq_first_item((asdl_seq*)seq))
|
|
+#ifndef UNUSED
|
|
#define UNUSED(expr) do { (void)(expr); } while (0)
|
|
+#endif
|
|
#define EXTRA_EXPR(head, tail) head->lineno, (head)->col_offset, (tail)->end_lineno, (tail)->end_col_offset, p->arena
|
|
#define EXTRA _start_lineno, _start_col_offset, _end_lineno, _end_col_offset, p->arena
|
|
PyObject *_PyPegen_new_type_comment(Parser *, const char *);
|
|
--
|
|
2.50.0
|
|
|