summaryrefslogtreecommitdiff
path: root/regex.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-27 02:46:54 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-27 02:46:54 +0000
commitece87af00c6e31181b7092980a351929c5421a43 (patch)
tree69f926f26570f7cbe08fe38dca0c011e8051e945 /regex.c
parent5615f7636e54d7010a1974bfa79ef2e31a44ffbd (diff)
* string.c (RESIZE_CAPA): check string attribute before modifying
capacity member of string structure. [ruby-dev:24594] * ext/zlib/zlib.c (gzreader_gets): use memchr() to to gain performance. [ruby-talk:117701] * sprintf.c (rb_f_sprintf): raise ArgumentError for extra arguments, unless (digit)$ style used. * ext/zlib/zlib.c (gzreader_gets): use memchr() to to gain performance. [ruby-talk:117701] * sprintf.c (rb_f_sprintf): raise ArgumentError for extra arguments, unless (digit)$ style used. * eval.c (frame_free): Guy Decoux solved the leak problem. Thanks. [ruby-core:03549] * ext/zlib/zlib.c (zstream_append_input): clear klass for z->input to avoid potential vulnerability. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/regex.c b/regex.c
index ff41eb8..eb6c9ef 100644
--- a/regex.c
+++ b/regex.c
@@ -2641,14 +2641,14 @@ slow_match(little, lend, big, bend, translate)
static int
slow_search(little, llen, big, blen, translate)
- unsigned char *little;
+ const unsigned char *little;
int llen;
- unsigned char *big;
+ const unsigned char *big;
int blen;
- char *translate;
+ const char *translate;
{
- unsigned char *bsave = big;
- unsigned char *bend = big + blen;
+ const unsigned char *bsave = big;
+ const unsigned char *bend = big + blen;
register int c;
int fescape = 0;
@@ -2718,12 +2718,12 @@ bm_init_skip(skip, pat, m, translate)
static int
bm_search(little, llen, big, blen, skip, translate)
- unsigned char *little;
+ const unsigned char *little;
int llen;
- unsigned char *big;
+ const unsigned char *big;
int blen;
int *skip;
- unsigned char *translate;
+ const unsigned char *translate;
{
int i, j, k;