summaryrefslogtreecommitdiff
path: root/regenc.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-01 22:06:11 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-01 22:06:11 +0000
commit046831094b355d8d293d22a3ad5be5332307c96c (patch)
tree2a5edfdc8cc5963b6767d82ba8e3939a84865620 /regenc.h
parentb16245145bd386b5d4cf4e25e9917718a10347cd (diff)
constify rb_encoding and OnigEncoding
* include/ruby/encoding.h: constify `rb_encoding` arguments. * include/ruby/oniguruma.h: constify `OnigEncoding` arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regenc.h')
-rw-r--r--regenc.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/regenc.h b/regenc.h
index 04a5e70..d7c6b60 100644
--- a/regenc.h
+++ b/regenc.h
@@ -197,9 +197,9 @@ ONIG_EXTERN const unsigned short OnigEncAsciiCtypeTable[];
#ifdef ONIG_ENC_REGISTER
-extern int ONIG_ENC_REGISTER(const char *, OnigEncodingType*);
+extern int ONIG_ENC_REGISTER(const char *, OnigEncoding);
#define OnigEncodingName(n) encoding_##n
-#define OnigEncodingDeclare(n) static OnigEncodingType OnigEncodingName(n)
+#define OnigEncodingDeclare(n) static const OnigEncodingType OnigEncodingName(n)
#define OnigEncodingDefine(f,n) \
OnigEncodingDeclare(n); \
void Init_##f(void) { \
@@ -209,7 +209,7 @@ extern int ONIG_ENC_REGISTER(const char *, OnigEncodingType*);
OnigEncodingDeclare(n)
#else
#define OnigEncodingName(n) OnigEncoding##n
-#define OnigEncodingDeclare(n) OnigEncodingType OnigEncodingName(n)
+#define OnigEncodingDeclare(n) const OnigEncodingType OnigEncodingName(n)
#define OnigEncodingDefine(f,n) OnigEncodingDeclare(n)
#endif