summaryrefslogtreecommitdiff
path: root/parse.y
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 /parse.y
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 'parse.y')
-rw-r--r--parse.y18
1 files changed, 9 insertions, 9 deletions
diff --git a/parse.y b/parse.y
index 4ee2b49392..7ecf367ba3 100644
--- a/parse.y
+++ b/parse.y
@@ -304,7 +304,7 @@ struct parser_params {
#ifdef RIPPER
#define intern_cstr_without_pindown(n,l,en) rb_intern3(n,l,en)
#else
-static ID intern_cstr_without_pindown(const char *, long, rb_encoding *);
+static ID intern_cstr_without_pindown(const char *, long, const rb_encoding *);
#endif
#define STR_NEW(p,n) rb_enc_str_new((p),(n),current_enc)
@@ -10258,7 +10258,7 @@ id_type(ID id)
#ifndef RIPPER
static int
-is_special_global_name(const char *m, const char *e, rb_encoding *enc)
+is_special_global_name(const char *m, const char *e, const rb_encoding *enc)
{
int mb = 0;
@@ -10290,7 +10290,7 @@ rb_symname_p(const char *name)
}
int
-rb_enc_symname_p(const char *name, rb_encoding *enc)
+rb_enc_symname_p(const char *name, const rb_encoding *enc)
{
return rb_enc_symname2_p(name, strlen(name), enc);
}
@@ -10299,7 +10299,7 @@ rb_enc_symname_p(const char *name, rb_encoding *enc)
#define IDSET_ATTRSET_FOR_INTERN (~(~0U<<(1<<ID_SCOPE_SHIFT)) & ~(1U<<ID_ATTRSET))
static int
-rb_enc_symname_type(const char *name, long len, rb_encoding *enc, unsigned int allowed_attrset)
+rb_enc_symname_type(const char *name, long len, const rb_encoding *enc, unsigned int allowed_attrset)
{
const char *m = name;
const char *e = m + len;
@@ -10397,7 +10397,7 @@ rb_enc_symname_type(const char *name, long len, rb_encoding *enc, unsigned int a
}
int
-rb_enc_symname2_p(const char *name, long len, rb_encoding *enc)
+rb_enc_symname2_p(const char *name, long len, const rb_encoding *enc)
{
return rb_enc_symname_type(name, len, enc, IDSET_ATTRSET_FOR_SYNTAX) != -1;
}
@@ -10507,7 +10507,7 @@ lookup_sym_id(st_data_t str, st_data_t *data)
}
static ID
-intern_cstr_without_pindown(const char *name, long len, rb_encoding *enc)
+intern_cstr_without_pindown(const char *name, long len, const rb_encoding *enc)
{
st_data_t data;
struct RString fake_str;
@@ -10523,7 +10523,7 @@ intern_cstr_without_pindown(const char *name, long len, rb_encoding *enc)
}
ID
-rb_intern3(const char *name, long len, rb_encoding *enc)
+rb_intern3(const char *name, long len, const rb_encoding *enc)
{
ID id;
@@ -11013,7 +11013,7 @@ rb_check_id(volatile VALUE *namep)
}
ID
-rb_check_id_cstr(const char *ptr, long len, rb_encoding *enc)
+rb_check_id_cstr(const char *ptr, long len, const rb_encoding *enc)
{
ID id;
@@ -11080,7 +11080,7 @@ attrsetname_to_attr(VALUE name)
}
ID
-rb_check_id_cstr_without_pindown(const char *ptr, long len, rb_encoding *enc)
+rb_check_id_cstr_without_pindown(const char *ptr, long len, const rb_encoding *enc)
{
st_data_t id;
struct RString fake_str;