summaryrefslogtreecommitdiff
path: root/libguile/gc-malloc.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-10-24 10:52:55 +0200
committerAndy Wingo <wingo@pobox.com>2011-10-24 12:54:14 +0200
commita141db8604ecca8a4f4c210cd680b41e337c689a (patch)
tree6d7fec7621586e8c569ec2451e2a4c93f674e5a5 /libguile/gc-malloc.c
parentc4e83f74c2f518d8c25959c6e7bb2b36e7058d01 (diff)
downloadguile-a141db8604ecca8a4f4c210cd680b41e337c689a.tar.gz
remove weak pairs, rewrite weak vectors
* libguile/weak-vector.c: * libguile/weak-vector.h: Renamed from weaks.[ch]. Remove weak pairs. They were not safe to access with `car' and `cdr'. Remove weak alist vectors, as we have weak tables and sets. Reimplement weak vectors, moving the implementation here. * libguile/vectors.c: * libguile/vectors.h: Remove the extra header word. Use scm_c_weak_vector_ref / scm_c_weak_vector_set_x to access weak vectors. * libguile/snarf.h: Remove the extra header word in vectors. * libguile/threads.c (do_thread_exit, fat_mutex_lock, fat_mutex_unlock): Instead of weak pairs, store thread-owned mutexes in a list of one-element weak vectors. * libguile/guardians.c (finalize_guarded): Similarly, store object guardians in a list of one-element weak vectors. * libguile/modules.c (scm_module_reverse_lookup): We no longer need to handle the case of weak references. * libguile/print.c (iprin1): Use the standard vector accessor to print vectors. * libguile.h: * libguile/Makefile.am: * libguile/gc-malloc.c: * libguile/gc.c: * libguile/goops.c: * libguile/init.c: * libguile/objprop.c: * libguile/struct.c: Update includes. * module/ice-9/weak-vector.scm: Load weak vector definitions using an extension instead of %init-weaks-builtins. * test-suite/tests/weaks.test: Use the make-...-hash-table names instead of the old alist vector names.
Diffstat (limited to 'libguile/gc-malloc.c')
-rw-r--r--libguile/gc-malloc.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/libguile/gc-malloc.c b/libguile/gc-malloc.c
index 839154a46..d02d8470e 100644
--- a/libguile/gc-malloc.c
+++ b/libguile/gc-malloc.c
@@ -43,7 +43,6 @@ extern unsigned long * __libc_ia64_register_backing_store_base;
#include "libguile/root.h"
#include "libguile/strings.h"
#include "libguile/vectors.h"
-#include "libguile/weaks.h"
#include "libguile/hashtab.h"
#include "libguile/tags.h"