aboutsummaryrefslogtreecommitdiffstats
path: root/encindex.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-22 01:03:17 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-22 01:03:17 +0000
commit113e49ed00f4cb73c1a5170150e1db4cab27c544 (patch)
tree6616db836fa074425156cffc1a2612d64e314f2f /encindex.h
parent62267fce470a695efea49676f610ee0906712e6f (diff)
downloadruby-113e49ed00f4cb73c1a5170150e1db4cab27c544.tar.gz
encoding.c: rb_enc_find_index2
* string.c (str_undump): use rb_enc_find_index2 to find encoding by unterminated string. check the format before encoding name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'encindex.h')
-rw-r--r--encindex.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/encindex.h b/encindex.h
index dcb1646f3a..658b60a9fd 100644
--- a/encindex.h
+++ b/encindex.h
@@ -57,6 +57,8 @@ enum ruby_preserved_encindex {
#define rb_utf8_encindex() RUBY_ENCINDEX_UTF_8
#define rb_usascii_encindex() RUBY_ENCINDEX_US_ASCII
+int rb_enc_find_index2(const char *name, long len);
+
#if defined(__cplusplus)
#if 0
{ /* satisfy cc-mode */