weak-vector.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef SCM_WEAK_VECTOR_H
  2. #define SCM_WEAK_VECTOR_H
  3. /* Copyright 1995-1996,2000-2001,2003,2006,2008-2009,2011,2014,2018
  4. Free Software Foundation, Inc.
  5. This file is part of Guile.
  6. Guile is free software: you can redistribute it and/or modify it
  7. under the terms of the GNU Lesser General Public License as published
  8. by the Free Software Foundation, either version 3 of the License, or
  9. (at your option) any later version.
  10. Guile is distributed in the hope that it will be useful, but WITHOUT
  11. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
  13. License for more details.
  14. You should have received a copy of the GNU Lesser General Public
  15. License along with Guile. If not, see
  16. <https://www.gnu.org/licenses/>. */
  17. #include "libguile/scm.h"
  18. /* Weak vectors. */
  19. #define SCM_I_WVECTP(x) (SCM_HAS_TYP7 (x, scm_tc7_wvect))
  20. SCM_API SCM scm_make_weak_vector (SCM len, SCM fill);
  21. SCM_API SCM scm_weak_vector (SCM l);
  22. SCM_API SCM scm_weak_vector_p (SCM x);
  23. SCM_API SCM scm_weak_vector_length (SCM v);
  24. SCM_API SCM scm_weak_vector_ref (SCM v, SCM k);
  25. SCM_API SCM scm_weak_vector_set_x (SCM v, SCM k, SCM x);
  26. SCM_API SCM scm_c_make_weak_vector (size_t len, SCM fill);
  27. SCM_API int scm_is_weak_vector (SCM obj);
  28. SCM_API size_t scm_c_weak_vector_length (SCM vec);
  29. SCM_API SCM scm_c_weak_vector_ref (SCM v, size_t k);
  30. SCM_API void scm_c_weak_vector_set_x (SCM v, size_t k, SCM x);
  31. SCM_INTERNAL void scm_init_weak_vectors (void);
  32. #endif /* SCM_WEAK_VECTOR_H */