summaryrefslogtreecommitdiff
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
commite2479cc43febe9cf26093fa2103a199d2d245711 (patch)
tree6616db836fa074425156cffc1a2612d64e314f2f /encindex.h
parentb4dc51ce1059ab33dffa3ca37739efafe0a56fff (diff)
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 */