mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
* keywords.c, keywords.h (scm_c_make_keyword): New function.
(We should remove the use of the prefix '-'.)
This commit is contained in:
parent
f0cb1733dd
commit
430a6cc34e
2 changed files with 17 additions and 4 deletions
|
@ -112,6 +112,18 @@ scm_make_keyword_from_dash_symbol (symbol)
|
|||
return SCM_CDR (vcell);
|
||||
}
|
||||
|
||||
SCM
|
||||
scm_c_make_keyword (char *s)
|
||||
{
|
||||
SCM vcell;
|
||||
char *buf = scm_must_malloc (strlen (s) + 2, "keyword");
|
||||
buf[0] = '-';
|
||||
strcpy (buf + 1, s);
|
||||
vcell = scm_sysintern0 (buf);
|
||||
scm_must_free (buf);
|
||||
return scm_make_keyword_from_dash_symbol (SCM_CAR (vcell));
|
||||
}
|
||||
|
||||
SCM_PROC(s_keyword_p, "keyword?", 1, 0, 0, scm_keyword_p);
|
||||
|
||||
SCM
|
||||
|
|
|
@ -55,9 +55,10 @@ extern int scm_tc16_keyword;
|
|||
|
||||
|
||||
|
||||
extern SCM scm_make_keyword_from_dash_symbol SCM_P ((SCM symbol));
|
||||
extern SCM scm_keyword_p SCM_P ((SCM obj));
|
||||
extern SCM scm_keyword_dash_symbol SCM_P ((SCM keyword));
|
||||
extern void scm_init_keywords SCM_P ((void));
|
||||
extern SCM scm_make_keyword_from_dash_symbol (SCM symbol);
|
||||
extern SCM scm_c_make_keyword (char *s);
|
||||
extern SCM scm_keyword_p (SCM obj);
|
||||
extern SCM scm_keyword_dash_symbol (SCM keyword);
|
||||
extern void scm_init_keywords (void);
|
||||
|
||||
#endif /* KEYWORDSH */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue