summaryrefslogtreecommitdiffstats
path: root/include/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-28 19:27:10 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-28 19:27:10 +0000
commitbb2bdc887c717d4770a113b19f1b685f5837d960 (patch)
tree1439d697c7f32c7e8322bfd62d40ce9c2ed7e628 /include/ruby
parentedb751ca4d2b7513fa1bdd4df067fd59c98680a2 (diff)
downloadruby-bb2bdc887c717d4770a113b19f1b685f5837d960.tar.gz
ruby-bb2bdc887c717d4770a113b19f1b685f5837d960.tar.xz
ruby-bb2bdc887c717d4770a113b19f1b685f5837d960.zip
* encoding.c (rb_enc_alias): allow encodings multiple aliases.
* encoding.c (rb_enc_find_index): search the encoding which has the given name and return its index if found, or -1. * st.c (type_strcasehash): case-insensitive string hash type. * string.c (rb_str_force_encoding): force encoding of self. this name comes from [ruby-dev:31894] by Martin Duerst. [ruby-dev:31744] * include/ruby/encoding.h (rb_enc_find_index, rb_enc_associate_index): prototyped. * include/ruby/encoding.h (rb_enc_isctype): direct interface to ctype. * include/ruby/st.h (st_init_strcasetable): prototyped. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby')
-rw-r--r--include/ruby/encoding.h3
-rw-r--r--include/ruby/st.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h
index 562f4b14c..20b676369 100644
--- a/include/ruby/encoding.h
+++ b/include/ruby/encoding.h
@@ -39,8 +39,10 @@ typedef OnigEncodingType rb_encoding;
int rb_enc_to_index(rb_encoding*);
int rb_enc_get_index(VALUE obj);
+int rb_enc_find_index(const char *name);
rb_encoding* rb_enc_get(VALUE);
rb_encoding* rb_enc_check(VALUE,VALUE);
+void rb_enc_associate_index(VALUE, int);
void rb_enc_associate(VALUE, rb_encoding*);
void rb_enc_copy(VALUE, VALUE);
@@ -76,6 +78,7 @@ int rb_enc_codelen(int, rb_encoding*);
/* ptr, ptr, encoding -> prev_char */
#define rb_enc_prev_char(s,p,enc) (char *)onigenc_get_prev_char_head(enc,(UChar*)s,(UChar*)p)
+#define rb_enc_isctype(c,t,enc) ONIGENC_IS_CODE_CTYPE(enc,c,t)
#define rb_enc_isascii(c,enc) ONIGENC_IS_CODE_ASCII(c)
#define rb_enc_isalpha(c,enc) ONIGENC_IS_CODE_ALPHA(enc,c)
#define rb_enc_islower(c,enc) ONIGENC_IS_CODE_LOWER(enc,c)
diff --git a/include/ruby/st.h b/include/ruby/st.h
index 93089b0d3..96791c444 100644
--- a/include/ruby/st.h
+++ b/include/ruby/st.h
@@ -71,6 +71,8 @@ st_table *st_init_numtable(void);
st_table *st_init_numtable_with_size(int);
st_table *st_init_strtable(void);
st_table *st_init_strtable_with_size(int);
+st_table *st_init_strcasetable(void);
+st_table *st_init_strcasetable_with_size(int);
int st_delete(st_table *, st_data_t *, st_data_t *);
int st_delete_safe(st_table *, st_data_t *, st_data_t *, st_data_t);
int st_insert(st_table *, st_data_t, st_data_t);