1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

parser.rl: define enc_raise iff necessary

* ext/json/parser/parser.rl (enc_raise): no needs if rb_enc_raise
  is available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-04-18 06:24:38 +00:00
parent b38c0b7974
commit 5c0df05b92
2 changed files with 4 additions and 4 deletions

View file

@ -4,7 +4,7 @@
#include "parser.h"
#if defined HAVE_RUBY_ENCODING_H
# define EXC_ENCODING UTF8,
# define EXC_ENCODING UTF_8,
# ifndef HAVE_RB_ENC_RAISE
static void
enc_raise(rb_encoding *enc, VALUE exc, const char *fmt, ...)
@ -18,8 +18,8 @@ enc_raise(rb_encoding *enc, VALUE exc, const char *fmt, ...)
rb_exc_raise(rb_exc_new3(exc, mesg));
}
# define rb_enc_raise enc_raise
# endif
# define rb_enc_raise enc_raise
#else
# define EXC_ENCODING /* nothing */
# define rb_enc_raise rb_raise

View file

@ -2,7 +2,7 @@
#include "parser.h"
#if defined HAVE_RUBY_ENCODING_H
# define EXC_ENCODING UTF8,
# define EXC_ENCODING UTF_8,
# ifndef HAVE_RB_ENC_RAISE
static void
enc_raise(rb_encoding *enc, VALUE exc, const char *fmt, ...)
@ -16,8 +16,8 @@ enc_raise(rb_encoding *enc, VALUE exc, const char *fmt, ...)
rb_exc_raise(rb_exc_new3(exc, mesg));
}
# define rb_enc_raise enc_raise
# endif
# define rb_enc_raise enc_raise
#else
# define EXC_ENCODING /* nothing */
# define rb_enc_raise rb_raise