summaryrefslogtreecommitdiff
path: root/src/regex.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-08-15 12:56:38 -0600
committerTom Tromey <tromey@redhat.com>2012-08-15 12:56:38 -0600
commit68b32482437e05f0994c4dd0ab5b0c27d39f0f6d (patch)
treefe01584b00d03559210438ebc608a1d170ee00b3 /src/regex.c
parent5190da91e6ca41287190693a8999a6919a9cd8e6 (diff)
downloademacs-68b32482437e05f0994c4dd0ab5b0c27d39f0f6d.tar.gz
This introduces a thread-state object and moves various C globals
there. It also introduces #defines for these globals to avoid a monster patch. The #defines mean that this patch also has to rename a few fields whose names clash with the defines. There is currently just a single "thread"; so this patch does not impact Emacs behavior in any significant way.
Diffstat (limited to 'src/regex.c')
-rw-r--r--src/regex.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/regex.c b/src/regex.c
index 472ef727979..b995538e30d 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -1235,12 +1235,14 @@ print_double_string (where, string1, size1, string2, size2)
# define IF_LINT(Code) /* empty */
#endif
+#ifndef emacs
/* Set by `re_set_syntax' to the current regexp syntax to recognize. Can
also be assigned to arbitrarily: each pattern buffer stores its own
syntax, so it can be changed between regex compilations. */
/* This has no initializer because initialized variables in Emacs
become read-only after dumping. */
reg_syntax_t re_syntax_options;
+#endif
/* Specify the precise syntax of regexps for compilation. This provides
@@ -1260,8 +1262,10 @@ re_set_syntax (reg_syntax_t syntax)
}
WEAK_ALIAS (__re_set_syntax, re_set_syntax)
+#ifndef emacs
/* Regexp to use to replace spaces, or NULL meaning don't. */
static re_char *whitespace_regexp;
+#endif
void
re_set_whitespace_regexp (const char *regexp)
@@ -4900,12 +4904,6 @@ re_match (struct re_pattern_buffer *bufp, const char *string,
WEAK_ALIAS (__re_match, re_match)
#endif /* not emacs */
-#ifdef emacs
-/* In Emacs, this is the string or buffer in which we
- are matching. It is used for looking up syntax properties. */
-Lisp_Object re_match_object;
-#endif
-
/* re_match_2 matches the compiled pattern in BUFP against the
the (virtual) concatenation of STRING1 and STRING2 (of length SIZE1
and SIZE2, respectively). We start matching at POS, and stop