nuttx-apps/interpreters/python/patch/0007-undef-atexit_register.patch
Tiago Medicci c83e17c083 interpreters/python: Fix symbol collision with list_length function
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.
2025-07-22 14:18:23 +08:00

31 lines
901 B
Diff

From 6ebe2333a7862532aa50e7286db9ea8b9df895c4 Mon Sep 17 00:00:00 2001
From: Tiago Medicci <tiago.medicci@espressif.com>
Date: Wed, 13 Nov 2024 14:22:04 -0300
Subject: [PATCH 07/14] undef atexit_register
Even if not built, nuttx/include/nuttx/atexit.h defines it and this
causes conflicts.
Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
---
Modules/atexitmodule.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Modules/atexitmodule.c b/Modules/atexitmodule.c
index 297a8d74ba3..1fea72fbc99 100644
--- a/Modules/atexitmodule.c
+++ b/Modules/atexitmodule.c
@@ -175,6 +175,10 @@ Register a function to be executed upon normal program termination\n\
\n\
func is returned to facilitate usage as a decorator.");
+#ifdef atexit_register
+# undef atexit_register
+#endif
+
static PyObject *
atexit_register(PyObject *module, PyObject *args, PyObject *kwargs)
{
--
2.50.0