comparison src/search.c @ 18762:12c0de0113af

(compile_pattern_1): Don't declare val with CONST.
author Richard M. Stallman <rms@gnu.org>
date Sun, 13 Jul 1997 06:36:36 +0000
parents 4e4c8edb56da
children e7876a076881
comparison
equal deleted inserted replaced
18761:756cb4d82a49 18762:12c0de0113af
119 Lisp_Object *translate; 119 Lisp_Object *translate;
120 struct re_registers *regp; 120 struct re_registers *regp;
121 int posix; 121 int posix;
122 int multibyte; 122 int multibyte;
123 { 123 {
124 CONST char *val; 124 char *val;
125 reg_syntax_t old; 125 reg_syntax_t old;
126 126
127 cp->regexp = Qnil; 127 cp->regexp = Qnil;
128 cp->buf.translate = translate; 128 cp->buf.translate = translate;
129 cp->posix = posix; 129 cp->posix = posix;
130 cp->buf.multibyte = multibyte; 130 cp->buf.multibyte = multibyte;
131 BLOCK_INPUT; 131 BLOCK_INPUT;
132 old = re_set_syntax (RE_SYNTAX_EMACS 132 old = re_set_syntax (RE_SYNTAX_EMACS
133 | (posix ? 0 : RE_NO_POSIX_BACKTRACKING)); 133 | (posix ? 0 : RE_NO_POSIX_BACKTRACKING));
134 val = (CONST char *) re_compile_pattern ((char *) XSTRING (pattern)->data, 134 val = (char *) re_compile_pattern ((char *) XSTRING (pattern)->data,
135 XSTRING (pattern)->size, &cp->buf); 135 XSTRING (pattern)->size, &cp->buf);
136 re_set_syntax (old); 136 re_set_syntax (old);
137 UNBLOCK_INPUT; 137 UNBLOCK_INPUT;
138 if (val) 138 if (val)
139 Fsignal (Qinvalid_regexp, Fcons (build_string (val), Qnil)); 139 Fsignal (Qinvalid_regexp, Fcons (build_string (val), Qnil));
140 140