ruby-changes:40937
From: normal <ko1@a...>
Date: Thu, 10 Dec 2015 05:07:36 +0900 (JST)
Subject: [ruby-changes:40937] normal:r53016 (trunk): ext/socket/ifaddr.c: remove empty ifaddr_mark
normal 2015-12-10 05:07:23 +0900 (Thu, 10 Dec 2015) New Revision: 53016 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53016 Log: ext/socket/ifaddr.c: remove empty ifaddr_mark We do not need to maintain empty functions for GC, gc_mark_children will not attempt to dereference NULL dmark callbacks. * ext/socket/ifaddr.c (ifaddr_mark): remove empty function (ifaddr_type): pass zero to rb_data_type_t.function.dmark Modified files: trunk/ChangeLog trunk/ext/socket/ifaddr.c Index: ChangeLog =================================================================== --- ChangeLog (revision 53015) +++ ChangeLog (revision 53016) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Dec 10 05:03:51 2015 Eric Wong <e@8...> + + * ext/socket/ifaddr.c (ifaddr_mark): remove empty function + (ifaddr_type): pass zero to rb_data_type_t.function.dmark + Thu Dec 10 04:49:16 2015 Eric Wong <e@8...> * proc.c (bm_free): remove, use default free Index: ext/socket/ifaddr.c =================================================================== --- ext/socket/ifaddr.c (revision 53015) +++ ext/socket/ifaddr.c (revision 53016) @@ -41,11 +41,6 @@ get_root(const rb_ifaddr_t *ifaddr) https://github.com/ruby/ruby/blob/trunk/ext/socket/ifaddr.c#L41 } static void -ifaddr_mark(void *ptr) -{ -} - -static void ifaddr_free(void *ptr) { rb_ifaddr_t *ifaddr = ptr; @@ -69,7 +64,7 @@ ifaddr_memsize(const void *ptr) https://github.com/ruby/ruby/blob/trunk/ext/socket/ifaddr.c#L64 static const rb_data_type_t ifaddr_type = { "socket/ifaddr", - {ifaddr_mark, ifaddr_free, ifaddr_memsize,}, + {0, ifaddr_free, ifaddr_memsize,}, }; static inline rb_ifaddr_t * -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/