From dbadff0ababee2ebfe6e9d142603ed9df393fdb6 Mon Sep 17 00:00:00 2001
From: Per Hedbor <ph@opera.com>
Date: Sun, 3 Nov 2013 16:52:44 +0100
Subject: [PATCH] master()->predefines can now contain non-string values

Actually, they could always include at least 0, indicating no value,
just a define. But a new addition is the possibility of them being
callables. For now, simply ignore those
---
 lib/modules/Process.pmod | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/modules/Process.pmod b/lib/modules/Process.pmod
index 65a407ecd6..0b8c8d6205 100644
--- a/lib/modules/Process.pmod
+++ b/lib/modules/Process.pmod
@@ -456,7 +456,10 @@ Process spawn_pike(array(string) argv, void|mapping(string:mixed) options)
     if(options && options->add_predefines)
     {
       foreach (master()->predefines; string key; string value)
-        res+=({"-D" + key + "=" + value});
+	if( stringp( value ) )
+	  res+=({"-D" + key + "=" + value});
+	else if( intp( value ) )
+	  res+=({"-D" + key });
     }
     if(options && options->add_program_path)
     {
-- 
GitLab