diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-01-22 18:56:06 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-01-22 18:56:06 -0800 |
commit | 51b59d794fe1d4a82fcd842b478657cc93f91595 (patch) | |
tree | 25e57573403a13f3fe70934b40bf38c0190fd5ed /src/search.c | |
parent | 9e928ac989c824c376b1ab576a6da69cd86b12c6 (diff) | |
download | emacs-51b59d794fe1d4a82fcd842b478657cc93f91595.tar.gz |
Promote SSDATA macro from gtkutil.c and xsmfns.c to lisp.h.
Diffstat (limited to 'src/search.c')
-rw-r--r-- | src/search.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/search.c b/src/search.c index c7e6f15a876..570bbe72588 100644 --- a/src/search.c +++ b/src/search.c @@ -153,7 +153,7 @@ compile_pattern_1 (struct regexp_cache *cp, Lisp_Object pattern, Lisp_Object tra else re_set_whitespace_regexp (NULL); - val = (char *) re_compile_pattern ((char *) SDATA (pattern), + val = (char *) re_compile_pattern (SSDATA (pattern), SBYTES (pattern), &cp->buf); /* If the compiled pattern hard codes some of the contents of the @@ -414,7 +414,7 @@ string_match_1 (Lisp_Object regexp, Lisp_Object string, Lisp_Object start, int p immediate_quit = 1; re_match_object = string; - val = re_search (bufp, (char *) SDATA (string), + val = re_search (bufp, SSDATA (string), SBYTES (string), pos_byte, SBYTES (string) - pos_byte, (NILP (Vinhibit_changing_match_data) @@ -485,7 +485,7 @@ fast_string_match (Lisp_Object regexp, Lisp_Object string) immediate_quit = 1; re_match_object = string; - val = re_search (bufp, (char *) SDATA (string), + val = re_search (bufp, SSDATA (string), SBYTES (string), 0, SBYTES (string), 0); immediate_quit = 0; @@ -528,7 +528,7 @@ fast_string_match_ignore_case (Lisp_Object regexp, Lisp_Object string) immediate_quit = 1; re_match_object = string; - val = re_search (bufp, (char *) SDATA (string), + val = re_search (bufp, SSDATA (string), SBYTES (string), 0, SBYTES (string), 0); immediate_quit = 0; @@ -1268,7 +1268,7 @@ search_buffer (Lisp_Object string, EMACS_INT pos, EMACS_INT pos_byte, if (multibyte == STRING_MULTIBYTE (string)) { - raw_pattern = (unsigned char *) SDATA (string); + raw_pattern = SDATA (string); raw_pattern_size = SCHARS (string); raw_pattern_size_byte = SBYTES (string); } @@ -3254,4 +3254,3 @@ is to bind it with `let' around a small expression. */); defsubr (&Sset_match_data); defsubr (&Sregexp_quote); } - |