summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-08-10 01:04:39 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-08-10 01:04:39 +0900
commit88db6fa4793da3724c0128e53cfe1abead1774f8 (patch)
tree5a8c409ed824e1db1fe290f89e857270d03a504d
parent8d7e0159c0c9fa1a546b4fa324837beae5eea3ee (diff)
Use ENC_REPLICATE to copy an encoding
-rw-r--r--enc/gb2312.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/enc/gb2312.c b/enc/gb2312.c
index 6fc1573..7756534 100644
--- a/enc/gb2312.c
+++ b/enc/gb2312.c
@@ -1,13 +1,6 @@
-#include <ruby/ruby.h>
-#include <ruby/encoding.h>
#include "regenc.h"
-void
-Init_gb2312(void)
-{
- rb_enc_register("GB2312", rb_enc_find("EUC-KR"));
-}
-
+ENC_REPLICATE("GB2312", "EUC-KR")
ENC_ALIAS("EUC-CN", "GB2312")
ENC_ALIAS("eucCN", "GB2312")
ENC_REPLICATE("GB12345", "GB2312")