summaryrefslogtreecommitdiff
path: root/doc/ref/scheme-data.texi
diff options
context:
space:
mode:
authorNeil Jerram <neil@ossau.uklinux.net>2003-04-26 15:30:59 +0000
committerNeil Jerram <neil@ossau.uklinux.net>2003-04-26 15:30:59 +0000
commitd513f5c6b3f183c05b47ab2870940acb2976b450 (patch)
tree49b0def5afbd3f3db02552f17a72f0bf721d3d1b /doc/ref/scheme-data.texi
parent63bf8015ab1d936376db2efbd406a30b52ca1638 (diff)
downloadguile-d513f5c6b3f183c05b47ab2870940acb2976b450.tar.gz
Document scm_str2symbol and scm_mem2symbol.
Diffstat (limited to 'doc/ref/scheme-data.texi')
-rwxr-xr-xdoc/ref/scheme-data.texi12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/ref/scheme-data.texi b/doc/ref/scheme-data.texi
index d26ce7cae..125592df8 100755
--- a/doc/ref/scheme-data.texi
+++ b/doc/ref/scheme-data.texi
@@ -2692,6 +2692,18 @@ the case-sensitivity of symbols:
(string->symbol "K. Harper, M.D."))) @result{} #t
@end lisp
+From C, there are lower level functions that construct a Scheme symbol
+from a null terminated C string or from a sequence of bytes whose length
+is specified explicitly.
+
+@deffn {C Function} scm_str2symbol (const char * name)
+@deffnx {C Function} scm_mem2symbol (const char * name, size_t len)
+Construct and return a Scheme symbol whose name is specified by
+@var{name}. For @code{scm_str2symbol} @var{name} must be null
+terminated; For @code{scm_mem2symbol} the length of @var{name} is
+specified explicitly by @var{len}.
+@end deffn
+
Finally, some applications, especially those that generate new Scheme
code dynamically, need to generate symbols for use in the generated
code. The @code{gensym} primitive meets this need: