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

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
normal 2015-12-09 20:07:23 +00:00
parent e373aed707
commit 10735e2d03
2 changed files with 6 additions and 6 deletions

View file

@ -1,3 +1,8 @@
Thu Dec 10 05:03:51 2015 Eric Wong <e@80x24.org>
* 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@80x24.org>
* proc.c (bm_free): remove, use default free

View file

@ -40,11 +40,6 @@ get_root(const rb_ifaddr_t *ifaddr)
offsetof(rb_ifaddr_root_t, ary));
}
static void
ifaddr_mark(void *ptr)
{
}
static void
ifaddr_free(void *ptr)
{
@ -69,7 +64,7 @@ ifaddr_memsize(const void *ptr)
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 *