diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-05-13 21:25:22 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-06-19 18:17:25 +0900 |
commit | 1a2546c2be839baa7d0a50dc056d4d6987d26852 (patch) | |
tree | 19fef5d8b8d96452a51ab68e8093ea895192ca27 /ext/racc | |
parent | cbe06cd3501fdadd0e6e63094da2973484d70b0b (diff) |
Backport racc-1.4.15 from upstream.
Diffstat (limited to 'ext/racc')
-rw-r--r-- | ext/racc/cparse.c (renamed from ext/racc/cparse/cparse.c) | 8 | ||||
-rw-r--r-- | ext/racc/cparse/extconf.rb | 6 | ||||
-rw-r--r-- | ext/racc/depend (renamed from ext/racc/cparse/depend) | 0 | ||||
-rw-r--r-- | ext/racc/extconf.rb | 7 |
4 files changed, 13 insertions, 8 deletions
diff --git a/ext/racc/cparse/cparse.c b/ext/racc/cparse.c index b4429ed5f3..cc0e8659be 100644 --- a/ext/racc/cparse/cparse.c +++ b/ext/racc/cparse.c @@ -11,7 +11,7 @@ */ -#include "ruby/ruby.h" +#include <ruby.h> #ifndef FALSE #define FALSE 0 @@ -24,7 +24,7 @@ Important Constants ----------------------------------------------------------------------- */ -#define RACC_VERSION "1.4.5" +#define RACC_VERSION "1.4.15" #define DEFAULT_TOKEN -1 #define ERROR_TOKEN 1 @@ -72,6 +72,10 @@ static ID id_d_e_pop; # define LONG2NUM(i) INT2NUM(i) #endif +#ifndef HAVE_RB_ARY_SUBSEQ +# define rb_ary_subseq(ary, beg, len) rb_ary_new4(len, RARRAY_PTR(ary) + beg) +#endif + static ID value_to_id _((VALUE v)); static inline long num_to_long _((VALUE n)); diff --git a/ext/racc/cparse/extconf.rb b/ext/racc/cparse/extconf.rb deleted file mode 100644 index dfddf57111..0000000000 --- a/ext/racc/cparse/extconf.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: false -# $Id$ - -require 'mkmf' -have_func('rb_block_call', 'ruby/ruby.h') -create_makefile 'racc/cparse' diff --git a/ext/racc/cparse/depend b/ext/racc/depend index 441d4df0f7..441d4df0f7 100644 --- a/ext/racc/cparse/depend +++ b/ext/racc/depend diff --git a/ext/racc/extconf.rb b/ext/racc/extconf.rb new file mode 100644 index 0000000000..d36b03b388 --- /dev/null +++ b/ext/racc/extconf.rb @@ -0,0 +1,7 @@ +# $Id: 1e30abedf4eea155815d1efa5500ec817b10a2ab $ + +require 'mkmf' + +have_func('rb_ary_subseq') + +create_makefile 'racc/cparse' |