summaryrefslogtreecommitdiff
path: root/include/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-04 16:30:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-04 16:30:33 +0000
commit8638ee26e704cb9b2e40bcbced713d459a374b1f (patch)
treefb26b1bc5985fead18bfe5ea1e59f6c8bb1a4e32 /include/ruby
parent91f9acdfeee3cf4340988193bd1fa6ad1834789f (diff)
* include/ruby/intern.h, re.c (rb_reg_new): keep interface same as
1.8. [ruby-core:14583] * include/ruby/intern.h, re.c (rb_reg_new_str): renamed, and defines HAVE_RB_REG_NEW_STR macro to tell if it is available. * include/ruby/encoding.h (rb_enc_reg_new): added. * insns.def (toregexp), marshal.c (r_object0): use rb_reg_new_str(). * re.c (rb_reg_regcomp, rb_reg_s_union): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby')
-rw-r--r--include/ruby/encoding.h3
-rw-r--r--include/ruby/intern.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h
index 89f3ec36b8..2c247c99e9 100644
--- a/include/ruby/encoding.h
+++ b/include/ruby/encoding.h
@@ -58,7 +58,8 @@ void rb_enc_associate_index(VALUE, int);
void rb_enc_associate(VALUE, rb_encoding*);
void rb_enc_copy(VALUE dst, VALUE src);
-VALUE rb_enc_str_new(const char*, long len, rb_encoding*);
+VALUE rb_enc_str_new(const char*, long, rb_encoding*);
+VALUE rb_enc_reg_new(const char*, long, rb_encoding*, int);
PRINTF_ARGS(VALUE rb_enc_sprintf(rb_encoding *, const char*, ...), 2, 3);
VALUE rb_enc_vsprintf(rb_encoding *, const char*, va_list);
long rb_enc_strlen(const char*, const char*, rb_encoding*);
diff --git a/include/ruby/intern.h b/include/ruby/intern.h
index eaacc96052..9ccba10498 100644
--- a/include/ruby/intern.h
+++ b/include/ruby/intern.h
@@ -454,7 +454,9 @@ VALUE rb_reg_last_match(VALUE);
VALUE rb_reg_match_pre(VALUE);
VALUE rb_reg_match_post(VALUE);
VALUE rb_reg_match_last(VALUE);
-VALUE rb_reg_new(VALUE, int);
+#define HAVE_RB_REG_NEW_STR 1
+VALUE rb_reg_new_str(VALUE, int);
+VALUE rb_reg_new(const char *, long, int);
VALUE rb_reg_match(VALUE, VALUE);
VALUE rb_reg_match2(VALUE);
int rb_reg_options(VALUE);