mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/socket/option.c (sockopt_initialize): argument conversion
reordered. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fd9c7e8af1
commit
48de4753d1
2 changed files with 9 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Mon Feb 9 19:52:32 2009 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* ext/socket/option.c (sockopt_initialize): argument conversion
|
||||||
|
reordered.
|
||||||
|
|
||||||
Mon Feb 9 19:46:22 2009 Tanaka Akira <akr@fsij.org>
|
Mon Feb 9 19:46:22 2009 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* ext/socket/ancdata.c (ancillary_initialize): add family argument.
|
* ext/socket/ancdata.c (ancillary_initialize): add family argument.
|
||||||
|
|
|
@ -37,14 +37,13 @@ optname_to_sym(int level, int optname)
|
||||||
static VALUE
|
static VALUE
|
||||||
sockopt_initialize(VALUE self, VALUE vfamily, VALUE vlevel, VALUE voptname, VALUE data)
|
sockopt_initialize(VALUE self, VALUE vfamily, VALUE vlevel, VALUE voptname, VALUE data)
|
||||||
{
|
{
|
||||||
int family;
|
int family = family_arg(vfamily);
|
||||||
int level;
|
int level = level_arg(vlevel);
|
||||||
|
int optname = optname_arg(level, voptname);
|
||||||
StringValue(data);
|
StringValue(data);
|
||||||
level = level_arg(vlevel);
|
|
||||||
family = family_arg(vfamily);
|
|
||||||
rb_ivar_set(self, rb_intern("family"), INT2NUM(family));
|
rb_ivar_set(self, rb_intern("family"), INT2NUM(family));
|
||||||
rb_ivar_set(self, rb_intern("level"), INT2NUM(level));
|
rb_ivar_set(self, rb_intern("level"), INT2NUM(level));
|
||||||
rb_ivar_set(self, rb_intern("optname"), INT2NUM(optname_arg(level, voptname)));
|
rb_ivar_set(self, rb_intern("optname"), INT2NUM(optname));
|
||||||
rb_ivar_set(self, rb_intern("data"), data);
|
rb_ivar_set(self, rb_intern("data"), data);
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue