[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile/guile-core NEWS libguile/ChangeLog libgui...
From: |
Dirk Herrmann |
Subject: |
guile/guile-core NEWS libguile/ChangeLog libgui... |
Date: |
Fri, 08 Dec 2000 08:32:37 -0800 |
CVSROOT: /cvs
Module name: guile
Changes by: Dirk Herrmann <address@hidden> 00/12/08 08:32:36
Modified files:
guile-core : NEWS
guile-core/libguile: ChangeLog symbols.c symbols.h
Log message:
* New functions: scm_str2symbol, scm_mem2symbol
CVSWeb URLs:
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/NEWS.diff?r1=1.225&r2=1.226
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/ChangeLog.diff?r1=1.1197&r2=1.1198
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/symbols.c.diff?r1=1.69&r2=1.70
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/symbols.h.diff?r1=1.46&r2=1.47
Patches:
Index: guile/guile-core/NEWS
diff -u guile/guile-core/NEWS:1.225 guile/guile-core/NEWS:1.226
--- guile/guile-core/NEWS:1.225 Fri Dec 8 05:41:56 2000
+++ guile/guile-core/NEWS Fri Dec 8 08:32:36 2000
@@ -216,6 +216,13 @@
In contrast to scm_boot_guile, scm_init_guile will return normally
after initializing Guile. It is not available on all systems, tho.
+** New functions: scm_str2symbol, scm_mem2symbol
+
+The function scm_str2symbol takes a const char* pointing to a zero-terminated
+field of characters and creates a scheme symbol object from that C string.
+The function scm_mem2symbol takes a const char* and a number of characters and
+creates a symbol from the characters in that memory area.
+
** New functions: scm_primitive_make_property
scm_primitive_property_ref
scm_primitive_property_set_x
Index: guile/guile-core/libguile/ChangeLog
diff -u guile/guile-core/libguile/ChangeLog:1.1197
guile/guile-core/libguile/ChangeLog:1.1198
--- guile/guile-core/libguile/ChangeLog:1.1197 Fri Dec 8 05:41:56 2000
+++ guile/guile-core/libguile/ChangeLog Fri Dec 8 08:32:36 2000
@@ -1,5 +1,12 @@
2000-12-08 Dirk Herrmann <address@hidden>
+ * symbols.[ch] (scm_mem2symbol, scm_str2symbol): New functions.
+ These shall replace all those calls to scm_intern... which are
+ only required to create a scheme symbol from a C string or a field
+ of chars.
+
+2000-12-08 Dirk Herrmann <address@hidden>
+
* environments.c (DEFAULT_OBARRAY_SIZE), gc.c
(DEFAULT_SYMHASH_SIZE): Added to locally determine arbitrary
default values for obarrays, thus removing the dependency from
Index: guile/guile-core/libguile/symbols.c
diff -u guile/guile-core/libguile/symbols.c:1.69
guile/guile-core/libguile/symbols.c:1.70
--- guile/guile-core/libguile/symbols.c:1.69 Fri Dec 8 05:41:56 2000
+++ guile/guile-core/libguile/symbols.c Fri Dec 8 08:32:36 2000
@@ -317,6 +317,20 @@
SCM
+scm_mem2symbol (const char *mem, scm_sizet len)
+{
+ return SCM_CAR (scm_intern_obarray_soft (mem, len, scm_symhash, 0));
+}
+
+
+SCM
+scm_str2symbol (const char *str)
+{
+ return SCM_CAR (scm_intern_obarray_soft (str, strlen (str), scm_symhash, 0));
+}
+
+
+SCM
scm_intern_obarray (const char *name,scm_sizet len,SCM obarray)
{
return scm_intern_obarray_soft (name, len, obarray, 0);
Index: guile/guile-core/libguile/symbols.h
diff -u guile/guile-core/libguile/symbols.h:1.46
guile/guile-core/libguile/symbols.h:1.47
--- guile/guile-core/libguile/symbols.h:1.46 Fri Dec 8 05:41:56 2000
+++ guile/guile-core/libguile/symbols.h Fri Dec 8 08:32:36 2000
@@ -72,6 +72,10 @@
extern unsigned long scm_string_hash (const unsigned char *str, scm_sizet len);
+
+extern SCM scm_mem2symbol (const char*, scm_sizet);
+extern SCM scm_str2symbol (const char*);
+
extern SCM scm_sym2vcell (SCM sym, SCM thunk, SCM definep);
extern SCM scm_sym2ovcell_soft (SCM sym, SCM obarray);
extern SCM scm_sym2ovcell (SCM sym, SCM obarray);