summaryrefslogtreecommitdiff
path: root/ccode
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2021-12-27 07:41:09 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2021-12-27 07:48:35 +0100
commit0c0c4e6fec54a78c1b41a218dd669d78dbdc046a (patch)
treecef87785ddd561d8a129fe5f4eb43547fc490f30 /ccode
parentb2ef0ed8d2c37a813f9ad8b35c7a7e4a1d639e1c (diff)
downloadvala-0c0c4e6fec54a78c1b41a218dd669d78dbdc046a.tar.gz
Revert "Make more use of native GLib.Regex syntax"
This reverts commit b2ef0ed8d2c37a813f9ad8b35c7a7e4a1d639e1c.
Diffstat (limited to 'ccode')
-rw-r--r--ccode/valaccodewriter.vala5
1 files changed, 4 insertions, 1 deletions
diff --git a/ccode/valaccodewriter.vala b/ccode/valaccodewriter.vala
index 11a3b0e31..21cc41720 100644
--- a/ccode/valaccodewriter.vala
+++ b/ccode/valaccodewriter.vala
@@ -48,6 +48,8 @@ public class Vala.CCodeWriter {
get { return _bol; }
}
+ static GLib.Regex fix_indent_regex;
+
private string temp_filename;
private bool file_exists;
@@ -244,7 +246,8 @@ public class Vala.CCodeWriter {
bool first = true;
// discard tabs at beginning of line
- unowned Regex fix_indent_regex = /^\t+/;
+ if (fix_indent_regex == null)
+ fix_indent_regex = new GLib.Regex ("^\t+");;
foreach (unowned string line in text.split ("\n")) {
if (!first) {