ext/socket/ancdata.c: use RB_GC_GUARD instead of volatile
See doc/extension.rdoc for explanation. [ruby-core:69419] [Feature #11198] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c1f355d91f
commit
5e3455597d
@ -1,3 +1,8 @@
|
|||||||
|
Sat May 30 16:12:35 2015 Eric Wong <e@80x24.org>
|
||||||
|
|
||||||
|
* ext/socket/ancdata.c: use RB_GC_GUARD instead of volatile
|
||||||
|
[ruby-core:69419] [Feature #11198]
|
||||||
|
|
||||||
Sat May 30 15:59:10 2015 NAKAMURA Usaku <usa@ruby-lang.org>
|
Sat May 30 15:59:10 2015 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* lib/tempfile.rb (Tempfile#initialize): initialize @unlinked to fix
|
* lib/tempfile.rb (Tempfile#initialize): initialize @unlinked to fix
|
||||||
|
@ -1135,7 +1135,7 @@ bsock_sendmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
|
|||||||
struct msghdr mh;
|
struct msghdr mh;
|
||||||
struct iovec iov;
|
struct iovec iov;
|
||||||
#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
|
#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
|
||||||
volatile VALUE controls_str = 0;
|
VALUE controls_str = 0;
|
||||||
VALUE *controls_ptr = NULL;
|
VALUE *controls_ptr = NULL;
|
||||||
int family;
|
int family;
|
||||||
#endif
|
#endif
|
||||||
@ -1291,6 +1291,9 @@ bsock_sendmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
|
|||||||
rb_readwrite_sys_fail(RB_IO_WAIT_WRITABLE, "sendmsg(2) would block");
|
rb_readwrite_sys_fail(RB_IO_WAIT_WRITABLE, "sendmsg(2) would block");
|
||||||
rb_sys_fail("sendmsg(2)");
|
rb_sys_fail("sendmsg(2)");
|
||||||
}
|
}
|
||||||
|
#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
|
||||||
|
RB_GC_GUARD(controls_str);
|
||||||
|
#endif
|
||||||
|
|
||||||
return SSIZET2NUM(ss);
|
return SSIZET2NUM(ss);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user