[PATCH] build: Let the get-integer action return None

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Oct 20 09:16:32 UTC 2023


If used with the format-and-define action, this will result in an
undefined define.
---
 wscript | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/wscript b/wscript
index c8481d4fde..595dc09efd 100755
--- a/wscript
+++ b/wscript
@@ -1011,6 +1011,8 @@ class OptionItem(Item):
             value = self.default_value(conf.env.ENABLE)
             if value is None:
                 return value
+        if not value:
+                return None
         try:
             return eval(value)
         except Exception as e:
-- 
2.35.3



More information about the devel mailing list