mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 20:00:19 +02:00
* libguile/weaks.c (scm_is_weak_vector, scm_c_weak_vector_length): (scm_c_weak_vector_ref, scm_c_weak_vector_set_x): New interfaces for dealing with weak vectors from C. (scm_weak_vector_length, scm_weak_vector_ref, scm_weak_vector_set_x): New Scheme interfaces to weak vectors; to be used instead of vector-length, vector-ref, etc. * module/ice-9/weak-vector.scm: Export the new interfaces. * doc/ref/api-memory.texi (Weak vectors): Document them.
32 lines
1.3 KiB
Scheme
32 lines
1.3 KiB
Scheme
;;; installed-scm-file
|
||
|
||
;;;; Copyright (C) 2003, 2006, 2014 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 as published by the Free Software Foundation; either
|
||
;;;; version 3 of the License, or (at your option) any later version.
|
||
;;;;
|
||
;;;; This library is distributed in the hope that it will be useful,
|
||
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
;;;; Lesser General Public License for more details.
|
||
;;;;
|
||
;;;; You should have received a copy of the GNU Lesser General Public
|
||
;;;; License along with this library; if not, write to the Free Software
|
||
;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||
;;;;
|
||
|
||
|
||
(define-module (ice-9 weak-vector)
|
||
:export (make-weak-vector list->weak-vector weak-vector weak-vector?
|
||
weak-vector-length weak-vector-ref weak-vector-set!
|
||
make-weak-key-alist-vector
|
||
make-weak-value-alist-vector
|
||
make-doubly-weak-alist-vector
|
||
weak-key-alist-vector?
|
||
weak-value-alist-vector?
|
||
doubly-weak-alist-vector?) ; C
|
||
)
|
||
|
||
(%init-weaks-builtins) ; defined in libguile/weaks.c
|