95e76d
diff -up glibmm-2.56.0/tools/extra_defs_gen/generate_extra_defs.cc.no-regex-replace glibmm-2.56.0/tools/extra_defs_gen/generate_extra_defs.cc
95e76d
--- glibmm-2.56.0/tools/extra_defs_gen/generate_extra_defs.cc.no-regex-replace	2018-06-09 12:23:09.263360049 -0400
95e76d
+++ glibmm-2.56.0/tools/extra_defs_gen/generate_extra_defs.cc	2018-06-09 12:42:26.490317489 -0400
95e76d
@@ -36,6 +36,25 @@ void add_signal_flag_if(std::string& str
95e76d
 
95e76d
 } // anonymous namespace
95e76d
 
95e76d
+static std::string
95e76d
+string_replace (const char *input,
95e76d
+                const char *old_token,
95e76d
+                const char *new_token)
95e76d
+{
95e76d
+  char **split_string;
95e76d
+  char *c_output;
95e76d
+  std::string output;
95e76d
+
95e76d
+  split_string = g_strsplit (input, old_token, -1);
95e76d
+  c_output = g_strjoinv (new_token, split_string);
95e76d
+  g_strfreev (split_string);
95e76d
+
95e76d
+  output = c_output;
95e76d
+  g_free (c_output);
95e76d
+
95e76d
+  return output;
95e76d
+}
95e76d
+
95e76d
 std::string
95e76d
 get_property_with_node_name(
95e76d
   GParamSpec* pParamSpec, const std::string& strObjectName, const std::string& strNodeName)
95e76d
@@ -87,7 +106,7 @@ get_property_with_node_name(
95e76d
       // Replace newlines with \n.
95e76d
       // A string default value can contain newline characters.
95e76d
       // gmmproc removes all newlines when it reads .defs files.
95e76d
-      defString = std::regex_replace(defCString, std::regex("\n"), "\\n");
95e76d
+      defString = string_replace (defCString, "\n", "\\n");
95e76d
     }
95e76d
     else
95e76d
       defString = ""; // A NULL string pointer becomes an empty string.