More static functions

This commit is contained in:
Justin Ethier 2018-11-27 10:32:18 -05:00
parent c9551d6ac8
commit 369b6f3c77
2 changed files with 3 additions and 6 deletions

View file

@ -719,10 +719,7 @@ void Cyc_rt_raise_msg(void *data, const char *err);
*/ */
/**@{*/ /**@{*/
object add_symbol(symbol_type * psym); object add_symbol(symbol_type * psym);
object add_symbol_by_name(const char *name);
object find_symbol_by_name(const char *name);
object find_or_add_symbol(const char *name); object find_or_add_symbol(const char *name);
char *_strdup(const char *s);
/**@}*/ /**@}*/
/** /**

View file

@ -368,7 +368,7 @@ void Cyc_st_print(void *data, FILE * out)
For now, GC of symbols is missing. long-term it probably would be desirable For now, GC of symbols is missing. long-term it probably would be desirable
*/ */
char *_strdup(const char *s) static char *_strdup(const char *s)
{ {
char *d = malloc(strlen(s) + 1); char *d = malloc(strlen(s) + 1);
if (d) { if (d) {
@ -377,7 +377,7 @@ char *_strdup(const char *s)
return d; return d;
} }
object find_symbol_by_name(const char *name) static object find_symbol_by_name(const char *name)
{ {
symbol_type tmp = { {0}, symbol_tag, name}; symbol_type tmp = { {0}, symbol_tag, name};
object result = set_get(&symbol_table, &tmp); object result = set_get(&symbol_table, &tmp);
@ -396,7 +396,7 @@ object add_symbol(symbol_type * psym)
return psym; return psym;
} }
object add_symbol_by_name(const char *name) static object add_symbol_by_name(const char *name)
{ {
symbol_type sym = { {0}, symbol_tag, _strdup(name)}; symbol_type sym = { {0}, symbol_tag, _strdup(name)};
symbol_type *psym = malloc(sizeof(symbol_type)); symbol_type *psym = malloc(sizeof(symbol_type));