ruby-changes:55736
From: Nobuyoshi <ko1@a...>
Date: Thu, 16 May 2019 15:42:03 +0900 (JST)
Subject: [ruby-changes:55736] Nobuyoshi Nakada: 973431c059 (trunk): Make internal functions static
https://git.ruby-lang.org/ruby.git/commit/?id=973431c059 From 973431c059ab2719e97d1ec051d21aa63a43a005 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 16 May 2019 15:36:58 +0900 Subject: Make internal functions static diff --git a/gc.c b/gc.c index afa194b..f7e8f2b 100644 --- a/gc.c +++ b/gc.c @@ -7452,7 +7452,8 @@ init_cursors(rb_objspace_t *objspace, struct heap_cursor *free, struct heap_curs https://github.com/ruby/ruby/blob/trunk/gc.c#L7452 scan->objspace = objspace; } -int count_pinned(struct heap_page *page) +static int +count_pinned(struct heap_page *page) { RVALUE *pstart = page->start; RVALUE *pend = pstart + page->total_slots; @@ -7476,14 +7477,16 @@ int count_pinned(struct heap_page *page) https://github.com/ruby/ruby/blob/trunk/gc.c#L7477 return pinned; } -int compare_pinned(const void *left, const void *right, void *dummy) +static int +compare_pinned(const void *left, const void *right, void *dummy) { int left_count = count_pinned(*(struct heap_page * const *)left); int right_count = count_pinned(*(struct heap_page * const *)right); return right_count - left_count; } -int compare_free_slots(const void *left, const void *right, void *dummy) +static int +compare_free_slots(const void *left, const void *right, void *dummy) { struct heap_page *left_page; struct heap_page *right_page; -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/