From 55a70c6f92a6e23ffa77a2ecce9648370a13cc22 Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 25 Nov 2007 13:25:34 +0000 Subject: * include/ruby/encoding.h (rb_enc_str_asciionly_p): declared. (rb_enc_str_asciicompat_p): defined. * re.c (rb_reg_initialize_str): use rb_enc_str_asciionly_p. (rb_reg_quote): return ascii-8bit string if the argument is ascii-only to generate encoding generic regexp if possible. (rb_reg_s_union): fix encoding handling. [ruby-dev:32094] * string.c (rb_enc_str_asciionly_p): defined. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/encoding.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/ruby/encoding.h') diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h index aaea7b3ca..93fe77de2 100644 --- a/include/ruby/encoding.h +++ b/include/ruby/encoding.h @@ -100,6 +100,8 @@ int rb_enc_tolower(int c, rb_encoding *enc); ID rb_intern3(const char*, long, rb_encoding*); int rb_enc_symname_p(const char*, rb_encoding*); int rb_enc_str_coderange(VALUE); +int rb_enc_str_asciionly_p(VALUE); +#define rb_enc_str_asciicompat_p(str) rb_enc_asciicompat(rb_enc_get(str)) VALUE rb_enc_from_encoding(rb_encoding *enc); rb_encoding *rb_enc_primary(void); rb_encoding *rb_enc_default(void); -- cgit