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

* variable.c (rb_define_hooked_variable): suppress false assertion

with VC9.  [ruby-core:22115]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-02-15 02:45:31 +00:00
parent 29f73c43a5
commit b955b34d5f
2 changed files with 31 additions and 31 deletions

View file

@ -1,3 +1,8 @@
Sun Feb 15 11:45:29 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* variable.c (rb_define_hooked_variable): suppress false assertion
with VC9. [ruby-core:22115]
Sun Feb 15 08:35:33 2009 Tanaka Akira <akr@fsij.org>
* test/test_pp.rb: extract from lib/pp.rb.

View file

@ -470,15 +470,10 @@ rb_define_hooked_variable(
VALUE (*getter)(ANYARGS),
void (*setter)(ANYARGS))
{
struct global_variable *gvar;
ID id;
VALUE tmp;
volatile VALUE tmp = var ? *var : Qnil;
ID id = global_id(name);
struct global_variable *gvar = rb_global_entry(id)->var;
if (var)
tmp = *var;
id = global_id(name);
gvar = rb_global_entry(id)->var;
gvar->data = (void*)var;
gvar->getter = getter?(gvar_getter_t *)getter:var_getter;
gvar->setter = setter?(gvar_setter_t *)setter:var_setter;