summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libguile/foreign.h5
-rw-r--r--test-suite/tests/gc.test21
2 files changed, 18 insertions, 8 deletions
diff --git a/libguile/foreign.h b/libguile/foreign.h
index 6c6f37306..75e3bf529 100644
--- a/libguile/foreign.h
+++ b/libguile/foreign.h
@@ -1,7 +1,7 @@
#ifndef SCM_FOREIGN_H
#define SCM_FOREIGN_H
-/* Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -23,8 +23,7 @@
/* A "foreign pointer" is a wrapped C pointer. It is represented by a
cell whose second word is a pointer. The first word has the
- `scm_tc7_pointer' type code and a bit saying whether it has an
- associated finalizer or not.
+ `scm_tc7_pointer' type code.
The basic idea is that we can help the programmer to avoid cutting herself,
but we won't take away her knives. */
diff --git a/test-suite/tests/gc.test b/test-suite/tests/gc.test
index 1afcea332..e13c8f7cd 100644
--- a/test-suite/tests/gc.test
+++ b/test-suite/tests/gc.test
@@ -22,6 +22,16 @@
#:use-module ((system base compile) #:select (compile)))
+;; Some of these tests verify that things are collectable. As we use a
+;; third-party conservative collector, we really can't guarantee that --
+;; we can try, but on some platforms, on some versions (possibly), the
+;; test might fail. But we don't want that to stop the build. So,
+;; instead of failing, throw 'unresolved.
+;;
+(define (maybe-gc-flakiness result)
+ (or result
+ (throw 'unresolved)))
+
;;;
;;; miscellaneous
;;;
@@ -73,11 +83,12 @@
(gc) ;; thrice: because the test doesn't succeed with only
;; one gc round. not sure why.
- (= (let lp ((i 0))
- (if (guard)
- (lp (1+ i))
- i))
- total)))
+ (maybe-gc-flakiness
+ (= (let lp ((i 0))
+ (if (guard)
+ (lp (1+ i))
+ i))
+ total))))
(pass-if "Lexical vars are collectable"
(let ((l (compile