提交 736a950b 编写于 作者: R Rich Felker

make inadvertently exposed __h{create,delete,search}_r functions static

上级 10bbbbf5
...@@ -24,9 +24,9 @@ struct __tab { ...@@ -24,9 +24,9 @@ struct __tab {
static struct hsearch_data htab; static struct hsearch_data htab;
int __hcreate_r(size_t, struct hsearch_data *); static int __hcreate_r(size_t, struct hsearch_data *);
void __hdestroy_r(struct hsearch_data *); static void __hdestroy_r(struct hsearch_data *);
int __hsearch_r(ENTRY, ACTION, ENTRY **, struct hsearch_data *); static int __hsearch_r(ENTRY, ACTION, ENTRY **, struct hsearch_data *);
static size_t keyhash(char *k) static size_t keyhash(char *k)
{ {
...@@ -101,7 +101,7 @@ ENTRY *hsearch(ENTRY item, ACTION action) ...@@ -101,7 +101,7 @@ ENTRY *hsearch(ENTRY item, ACTION action)
return e; return e;
} }
int __hcreate_r(size_t nel, struct hsearch_data *htab) static int __hcreate_r(size_t nel, struct hsearch_data *htab)
{ {
int r; int r;
...@@ -117,7 +117,7 @@ int __hcreate_r(size_t nel, struct hsearch_data *htab) ...@@ -117,7 +117,7 @@ int __hcreate_r(size_t nel, struct hsearch_data *htab)
} }
weak_alias(__hcreate_r, hcreate_r); weak_alias(__hcreate_r, hcreate_r);
void __hdestroy_r(struct hsearch_data *htab) static void __hdestroy_r(struct hsearch_data *htab)
{ {
if (htab->__tab) free(htab->__tab->entries); if (htab->__tab) free(htab->__tab->entries);
free(htab->__tab); free(htab->__tab);
...@@ -125,7 +125,7 @@ void __hdestroy_r(struct hsearch_data *htab) ...@@ -125,7 +125,7 @@ void __hdestroy_r(struct hsearch_data *htab)
} }
weak_alias(__hdestroy_r, hdestroy_r); weak_alias(__hdestroy_r, hdestroy_r);
int __hsearch_r(ENTRY item, ACTION action, ENTRY **retval, struct hsearch_data *htab) static int __hsearch_r(ENTRY item, ACTION action, ENTRY **retval, struct hsearch_data *htab)
{ {
size_t hash = keyhash(item.key); size_t hash = keyhash(item.key);
ENTRY *e = lookup(item.key, hash, htab); ENTRY *e = lookup(item.key, hash, htab);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册