mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
undefine alloc functions for C extensions
per guidance in doc/extension.rdoc, these classes now undefine their alloc functions: - ObjectSpace::InternalObjectWrapper - Socket::Ifaddr
This commit is contained in:
parent
e8e3b7a0e2
commit
c0f4e4ca6d
Notes:
git
2021-08-20 08:30:34 +09:00
2 changed files with 2 additions and 0 deletions
|
@ -460,6 +460,7 @@ rsock_init_sockifaddr(void)
|
|||
* Socket::Ifaddr represents a result of getifaddrs() function.
|
||||
*/
|
||||
rb_cSockIfaddr = rb_define_class_under(rb_cSocket, "Ifaddr", rb_cObject);
|
||||
rb_undef_alloc_func(rb_cSockIfaddr);
|
||||
rb_define_method(rb_cSockIfaddr, "inspect", ifaddr_inspect, 0);
|
||||
rb_define_method(rb_cSockIfaddr, "name", ifaddr_name, 0);
|
||||
rb_define_method(rb_cSockIfaddr, "ifindex", ifaddr_ifindex, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue