ruby-changes:49223
From: nobu <ko1@a...>
Date: Tue, 19 Dec 2017 21:20:25 +0900 (JST)
Subject: [ruby-changes:49223] nobu:r61338 (trunk): st.c: fix up
nobu 2017-12-19 21:20:21 +0900 (Tue, 19 Dec 2017) New Revision: 61338 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61338 Log: st.c: fix up * st.c (_st_table_list, _st_table_pool): symbols beginning with an underscore and a lower letter are preserved by the standard. * st.c (get_st_table): protoized. * st.c (st_insert_generic): adjust local variable type to an argument argc. Modified files: trunk/st.c Index: st.c =================================================================== --- st.c (revision 61337) +++ st.c (revision 61338) @@ -126,16 +126,16 @@ https://github.com/ruby/ruby/blob/trunk/st.c#L126 #define st_assert(cond) ((void)(0 && (cond))) #endif -typedef struct _st_table_list { +typedef struct st_table_list { st_table table; struct list_node node; } st_table_list; -struct _st_table_pool { +struct st_table_pool { struct list_head head; int length; }; -static struct _st_table_pool st_table_pool; +static struct st_table_pool st_table_pool; #define ST_TABLE_POOL_MAX_LENGTH 500 /* The type of hashes. */ @@ -562,7 +562,7 @@ stat_col(void) https://github.com/ruby/ruby/blob/trunk/st.c#L562 #endif static st_table * -get_st_table() +get_st_table(void) { st_table_list *table; @@ -2195,7 +2195,7 @@ st_insert_linear(st_table *tab, long arg https://github.com/ruby/ruby/blob/trunk/st.c#L2195 static void st_insert_generic(st_table *tab, long argc, const VALUE *argv, VALUE hash) { - int i; + long i; /* push elems */ for (i = 0; i < argc; /* */) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/