Benoit Daloze
fa7a712d46
Fix -Wundef warnings for HAVE_RB_EXT_RACTOR_SAFE
...
* See [Feature #17752 ]
2021-05-04 14:56:55 +02:00
Koichi Sasada
bcf4b236e4
ext/racc/cparse is ractor-safe
2020-12-20 04:22:29 +09:00
Nobuyoshi Nakada
5a77e90fe8
Use rb_intern_const instead of rb_intern in Init functions
...
```
find . -name \*.o -exec nm {} + |&
sed '/Init_.*\.rbimpl_id/!d;s/^.* b //;s/\.[1-9][0-9]*$//;s/\.rbimpl_id$//' |
uniq
```
should be empty.
2020-10-21 12:46:53 +09:00
Stefan Stüben
8c2e5bbf58
Don't redefine #rb_intern over and over again
2020-10-21 12:45:18 +09:00
Marc-Andre Lafortune
352895b751
[ruby/racc] Return `nil` for all syntax errors
...
https://github.com/ruby/racc/commit/51817ce0f6
2020-07-30 10:07:06 -04:00
卜部昌平
af5e256640
rb_catch now free from ANYARGS
...
After 5e86b005c0
, I now think ANYARGS is
dangerous and should be extinct. This commit deletes ANYARGS from
rb_catch, and fixes some bugs revealed by that.
2019-08-27 15:52:26 +09:00
Hiroshi SHIBATA
40f8c82b96
Partly revert directory structure for cparse.
...
It break the some build environment.
2019-06-19 18:35:44 +09:00
Hiroshi SHIBATA
1a2546c2be
Backport racc-1.4.15 from upstream.
2019-06-19 18:17:25 +09:00
nobu
655285b5f7
cparse.c: typed data
...
* ext/racc/cparse/cparse.c (cparse_params_type): use typed data.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-03 00:48:59 +00:00
nobu
ef9d134951
racc/cparse: private class
...
* ext/racc/cparse/cparse.c (Init_cparse): Racc::CparseParams is a
private class, undefine allocate and initialize methods.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-29 14:13:50 +00:00
nobu
eadaa8ba8b
ext: use PRIsVALUE for rb_raise and rb_warn
...
* ext/bigdecimal/bigdecimal.c (BigDecimal_new): use PRIsVALUE for
rb_raise() and rb_warn().
* ext/openssl/ossl_cipher.c (ossl_cipher_init): ditto.
* ext/racc/cparse/cparse.c (extract_user_token): ditto.
* ext/syslog/syslog.c (mSyslog_log): ditto.
* ext/openssl/ossl.h (OSSL_Check_Kind, OSSL_Check_Instance): now
ossl_raise() also accepts PRIsVALUE.
* ext/openssl/ossl_asn1.c (ossl_asn1_default_tag):
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-13 00:57:38 +00:00
nobu
7566c49068
ruby/ruby.h: RB_BLOCK_CALL_FUNC_ARGLIST
...
* include/ruby/ruby.h (RB_BLOCK_CALL_FUNC_ARGLIST): for declaration
argument list of rb_block_call_func.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-29 07:59:14 +00:00
eregon
8c6674ef03
* ext/racc/cparse/cparse.c: use rb_ary_entry() and
...
rb_ary_subseq() instead of RARRAY_PTR.
Based on a patch by Dirkjan Bussink. See Bug #8399 .
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10 20:06:53 +00:00
nobu
b0dd250dc9
use RB_TYPE_P() instead of comparison of TYPE()
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-23 07:13:21 +00:00
nobu
977267c2e0
* ext/**/*.[ch]: removed trailing spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-22 08:04:13 +00:00
nobu
d6191738bc
* ext/racc/cparse/cparse.c: suppressed warnings for shortening on
...
platforms where pointer is bigger than int.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-11 22:17:20 +00:00
nobu
2b592580bf
* include/ruby: moved public headers.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10 03:06:15 +00:00
aamine
6a48d31ced
* ext/racc/cparse/cparse.c (cparse_params_mark): remove useless rb_gc_mark. Thanks Tomoyuki Chikanaga. [ruby-dev:30405]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-24 01:38:26 +00:00
matz
2156870525
* ruby.h (struct RArray): embed small arrays.
...
(RARRAY_LEN): defined for accessing array members.
(RARRAY_PTR): ditto.
* array.c: use RARRAY_LEN and RARRAY_PTR.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02 14:42:08 +00:00
aamine
69aeed5065
* ext/racc/cparse/cparse.c: sync with original code, rev 1.8.
...
* ext/racc/cparse/cparse.c: should mark CparseParams objects.
* lib/racc/parser.rb: sync with original code, rev 1.8.
* lib/racc/parser.rb: update coding style.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-06 12:50:51 +00:00
aamine
fe42e405ab
* ext/racc/cparse/cparse.c: sync with original code, rev 1.7.
...
* ext/racc/cparse/cparse.c: must require version.h to get RUBY_VERSION_CODE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-02 10:04:14 +00:00
aamine
cafdfd306e
* ext/racc/cparse/cparse.c: sync with original source code, rev 1.6.
...
* ext/racc/cparse/cparse.c: do not use rb_iterate to give a block to the method, use rb_block_call instead. [ruby-dev:28445]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-02 09:43:11 +00:00
matz
1b7465e893
* eval.c, file.c, etc.: code-cleanup patch from Stefan Huehner
...
<stefan at huehner.org>. [ruby-core:08029]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-20 18:02:17 +00:00
matz
919f456de8
* exception message clean-up by Ian Macdonald <ian@caliban.org>.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-29 07:54:38 +00:00
aamine
7bf9e6d2a1
* lib/racc/parser.rb: synchronize with Racc 1.4.4.
...
* ext/racc/cparse/cparse.c: ditto.
* ext/racc/cparse/cparse.c (parse_main): should abort when the length of LR state stack <=1, not ==0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-03 13:55:01 +00:00
matz
f595d5b0d2
* array.c (rb_ary_values_at): new method to replace select(index..).
...
* hash.c (rb_hash_values_at,env_values_at): ditto.
* re.c (match_values_at): ditto.
* struct.c (rb_struct_values_at): ditto.
* re.c (match_select): add iterator behavior.
* ext/curses/curses.c, ext/digest/sha2/sha2.c, ext/iconv/iconv.c,
ext/racc/cparse/cparse.c: include "ruby.h" at the top to shut up
"_FILE_OFFSET_BITS redefined" warning on Solaris.
* class.c (rb_class_protected_instance_methods): now gives
warnings to show migration path. The default will be reversed
on Jan 2004.
* numeric.c (num_step): "1.1.step(1.5,0.1)" to work.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-04 16:03:24 +00:00
aamine
30bc60cfe4
* ext/racc/cparse/cparse.c: reduce goto.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-06 23:42:04 +00:00
eban
20479bfd81
* ext/racc/cparse/cparse.c (parse_main): avoid GCC 3 warning.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-06 04:35:00 +00:00
aamine
cceff0f4b4
* MANIFEST: add lib/racc/parser.rb.
...
* ext/racc/cparse/cparse.c: code refine.
* ext/racc/cparse/MANIFEST: add depend.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-05 13:38:49 +00:00
matz
de373b1b6c
* io.c (rb_io_fptr_cleanup): need flush even when io will not be
...
closed.
* io.c (rb_io_initialize): was calling wrong function
rb_io_mode_flags().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-01 08:31:49 +00:00
nobu
d79c23b0db
* ext/sdbm/init.c (each_pair): moved prototype before the
...
definition.
* ext/racc/cparse/cparse.c (call_scaniter): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-01 07:58:09 +00:00
usa
1ecdc6a115
* ext/racc/cparse/cparse.c: prototype; call_scaniter().
...
* ext/sdbm/init.c: prototype; each_pair().
* ext/tcltklib/tcltklib.c: prototypes; _timer_for_tcl() and ip_ruby(),
Nobu's patch at [ruby-dev:14483].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-01 06:21:24 +00:00
aamine
890521d117
racc runtime imported.
...
* lib/racc/parser.rb: new file.
* ext/racc/MANIFEST, cparse.c, depend, extconf.rb: new files.
* lib/README: add racc/parser.rb.
* ext/Setup*: add racc/cparse.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-22 07:20:31 +00:00