mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
More static functions
This commit is contained in:
parent
c9551d6ac8
commit
369b6f3c77
2 changed files with 3 additions and 6 deletions
|
@ -719,10 +719,7 @@ void Cyc_rt_raise_msg(void *data, const char *err);
|
|||
*/
|
||||
/**@{*/
|
||||
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);
|
||||
char *_strdup(const char *s);
|
||||
/**@}*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
char *_strdup(const char *s)
|
||||
static char *_strdup(const char *s)
|
||||
{
|
||||
char *d = malloc(strlen(s) + 1);
|
||||
if (d) {
|
||||
|
@ -377,7 +377,7 @@ char *_strdup(const char *s)
|
|||
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};
|
||||
object result = set_get(&symbol_table, &tmp);
|
||||
|
@ -396,7 +396,7 @@ object add_symbol(symbol_type * 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 *psym = malloc(sizeof(symbol_type));
|
||||
|
|
Loading…
Add table
Reference in a new issue