[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile/guile-core/libguile symbols.c
From: |
Marius Vollmer |
Subject: |
guile/guile-core/libguile symbols.c |
Date: |
Mon, 21 May 2001 05:26:37 -0700 |
CVSROOT: /cvs
Module name: guile
Changes by: Marius Vollmer <address@hidden> 01/05/21 05:26:37
Modified files:
guile-core/libguile: symbols.c
Log message:
(scm_mem2symbol): Re-introduce indirect cell. It is
needed for weak-key hashtables.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/symbols.c.diff?cvsroot=OldCVS&tr1=1.87&tr2=1.88&r1=text&r2=text
Patches:
Index: guile/guile-core/libguile/symbols.c
diff -u guile/guile-core/libguile/symbols.c:1.87
guile/guile-core/libguile/symbols.c:1.88
--- guile/guile-core/libguile/symbols.c:1.87 Sun May 20 12:31:58 2001
+++ guile/guile-core/libguile/symbols.c Mon May 21 05:26:37 2001
@@ -99,7 +99,7 @@
for (l = SCM_VELTS (symbols) [hash]; !SCM_NULLP (l); l = SCM_CDR (l))
{
- SCM sym = SCM_CAR (l);
+ SCM sym = SCM_CAAR (l);
if (SCM_SYMBOL_HASH (sym) == raw_hash
&& SCM_SYMBOL_LENGTH (sym) == len)
{
@@ -124,6 +124,7 @@
/* The symbol was not found - create it. */
SCM symbol;
+ SCM cell;
SCM slot;
SCM_NEWCELL2 (symbol);
@@ -133,7 +134,8 @@
SCM_SET_SYMBOL_LENGTH (symbol, (long) len);
slot = SCM_VELTS (symbols) [hash];
- SCM_VELTS (symbols) [hash] = scm_cons (symbol, slot);
+ cell = scm_cons (symbol, SCM_UNDEFINED);
+ SCM_VELTS (symbols) [hash] = scm_cons (cell, slot);
return symbol;
}