add pic_intern_str

This commit is contained in:
Yuichi Nishiwaki 2014-08-26 13:29:36 +09:00
parent b33a2e629c
commit 876e40bfa5
2 changed files with 7 additions and 0 deletions

View File

@ -146,6 +146,7 @@ void pic_defun(pic_state *, const char *, pic_func_t);
bool pic_equal_p(pic_state *, pic_value, pic_value); bool pic_equal_p(pic_state *, pic_value, pic_value);
pic_sym pic_intern(pic_state *, const char *, size_t); pic_sym pic_intern(pic_state *, const char *, size_t);
pic_sym pic_intern_str(pic_state *, pic_str *);
pic_sym pic_intern_cstr(pic_state *, const char *); pic_sym pic_intern_cstr(pic_state *, const char *);
const char *pic_symbol_name(pic_state *, pic_sym); const char *pic_symbol_name(pic_state *, pic_sym);
pic_sym pic_gensym(pic_state *, pic_sym); pic_sym pic_gensym(pic_state *, pic_sym);

View File

@ -37,6 +37,12 @@ pic_intern_cstr(pic_state *pic, const char *str)
return pic_intern(pic, str, strlen(str)); return pic_intern(pic, str, strlen(str));
} }
pic_sym
pic_intern_str(pic_state *pic, pic_str *str)
{
return pic_intern_cstr(pic, pic_str_cstr(str));
}
pic_sym pic_sym
pic_gensym(pic_state *pic, pic_sym base) pic_gensym(pic_state *pic, pic_sym base)
{ {