1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-07 20:50:17 +02:00

Move private bytevectors API to a separate header

Also give bytevectors a private type (a struct).

* libguile/bytevectors.h (SCM_BYTEVECTOR_HEADER_SIZE): Remove.
(SCM_BYTEVECTOR_LENGTH):
(SCM_BYTEVECTOR_CONTENTS): Proxy to the C accessors.
(SCM_BYTEVECTOR_PARENT): Remove from public API.
(SCM_BYTEVECTOR_P, SCM_VALIDATE_BYTEVECTOR): Make public.
(scm_c_bytevector_contents): New function.
* libguile/bytevectors-internal.h: New file.
* libguile/Makefile.am (noinst_HEADERS): Add new file.

* libguile/bytevectors.c:
* libguile/array-handle.c:
* libguile/arrays.c:
* libguile/foreign.c:
* libguile/goops.c:
* libguile/init.c:
* libguile/loader.c:
* libguile/print.c:
* libguile/r6rs-ports.c:
* libguile/srfi-4.c:
* libguile/strings.c: Adapt to use bytevectors-internal.h as needed, and
sometimes to use the internal bytevector type.
This commit is contained in:
Andy Wingo 2025-06-02 09:08:35 +02:00
parent 51bc69dd1c
commit 0134abce74
14 changed files with 310 additions and 276 deletions

View file

@ -1,4 +1,4 @@
/* Copyright 1995-1998,2000-2006,2009-2015,2018, 2021
/* Copyright 1995-1998,2000-2006,2009-2015,2018, 2021, 2025
Free Software Foundation, Inc.
This file is part of Guile.
@ -31,7 +31,6 @@
#include "array-map.h"
#include "bitvectors.h"
#include "boolean.h"
#include "bytevectors.h"
#include "chars.h"
#include "dynwind.h"
#include "eq.h"