[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/search.c,v
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/src/search.c,v |
Date: |
Tue, 03 Oct 2006 13:47:27 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 06/10/03 13:47:26
Index: search.c
===================================================================
RCS file: /sources/emacs/emacs/src/search.c,v
retrieving revision 1.216
retrieving revision 1.217
diff -u -b -r1.216 -r1.217
--- search.c 3 Oct 2006 13:25:26 -0000 1.216
+++ search.c 3 Oct 2006 13:47:26 -0000 1.217
@@ -216,7 +216,8 @@
}
}
-/* Clear the regexp cache.
+/* Clear the regexp cache w.r.t. a particular syntax table,
+ because it was changed.
There is no danger of memory leak here because re_compile_pattern
automagically manages the memory in each re_pattern_buffer struct,
based on its `allocated' and `buffer' values. */
@@ -226,6 +227,10 @@
int i;
for (i = 0; i < REGEXP_CACHE_SIZE; ++i)
+ /* It's tempting to compare with the syntax-table we've actually changd,
+ but it's not sufficient because char-table inheritance mewans that
+ modifying one syntax-table can change others at the same time. */
+ if (!EQ (searchbufs[i].syntax_table, Qt))
searchbufs[i].regexp = Qnil;
}