summaryrefslogtreecommitdiff
path: root/enc
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-04 00:50:59 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-04 00:50:59 +0000
commitb3d7273dc1f7e29a759de8dd88cd00f99a66bed1 (patch)
treedc22ba0d8d5d8f40e161cbb68f297bc6a50427a3 /enc
parente00b83ceb91048da8549399c11618345ce32d9cc (diff)
Add functions and macros for second encoding definitions.
* encoding.c (rb_enc_set_base): Add for setting base encoding with their names. this is internal function. * template/encdb.h.tmpl: specify ENC_SET_BASE for second encodings in each encoding files. * enc/encdb.c (rb_enc_set_base): add a declaration. (ENC_SET_BASE): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc')
-rw-r--r--enc/encdb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/enc/encdb.c b/enc/encdb.c
index 35f4c93b55..476b55dafe 100644
--- a/enc/encdb.c
+++ b/enc/encdb.c
@@ -13,10 +13,12 @@ int rb_encdb_replicate(const char *alias, const char *orig);
int rb_encdb_alias(const char *alias, const char *orig);
int rb_encdb_dummy(const char *name);
void rb_encdb_declare(const char *name);
+void rb_enc_set_base(const char *name, const char *orig);
#define ENC_REPLICATE(name, orig) rb_encdb_replicate(name, orig)
#define ENC_ALIAS(name, orig) rb_encdb_alias(name, orig)
#define ENC_DUMMY(name) rb_encdb_dummy(name)
#define ENC_DEFINE(name) rb_encdb_declare(name)
+#define ENC_SET_BASE(name) rb_enc_set_base(name)
void
Init_encdb(void)