mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ruby.c (verbose_setter, opt_W_getter): fixed prototypes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
80243ab386
commit
29ad22694f
2 changed files with 10 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Wed Jun 18 21:08:14 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* ruby.c (verbose_setter, opt_W_getter): fixed prototypes.
|
||||||
|
|
||||||
Wed Jun 18 19:20:00 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
Wed Jun 18 19:20:00 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* ruby.c (opt_W_getter): use ruby_verbose directly instead of parameter
|
* ruby.c (opt_W_getter): use ruby_verbose directly instead of parameter
|
||||||
|
|
10
ruby.c
10
ruby.c
|
@ -1440,15 +1440,17 @@ forbid_setid(const char *s, struct cmdline_options *opt)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
verbose_setter(VALUE val, ID id, VALUE *variable)
|
verbose_setter(VALUE val, ID id, void *data)
|
||||||
{
|
{
|
||||||
ruby_verbose = RTEST(val) ? Qtrue : val;
|
VALUE *variable = data;
|
||||||
|
*variable = RTEST(val) ? Qtrue : val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
opt_W_getter(VALUE val, ID id, VALUE *variable)
|
opt_W_getter(ID id, void *data)
|
||||||
{
|
{
|
||||||
switch (ruby_verbose) {
|
VALUE *variable = data;
|
||||||
|
switch (*variable) {
|
||||||
case Qnil:
|
case Qnil:
|
||||||
return INT2FIX(0);
|
return INT2FIX(0);
|
||||||
case Qfalse:
|
case Qfalse:
|
||||||
|
|
Loading…
Add table
Reference in a new issue