1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-01 23:30:28 +02:00
Commit graph

9753 commits

Author SHA1 Message Date
Andy Wingo
a6b848dcba Deprecate C hooks
* libguile/chooks.c:
* libguile/chooks.h: Remove.
* libguile/deprecated.h:
* libguile/deprecated.c: Add deprecated implementations.
* libguile/gc.c:
* libguile/gc.h: Arrange to call before/after C hooks if deprecated code
is enabled.
* libguile/Makefile.am:
* libguile.h: Remove chooks.[ch] references.
2025-06-25 12:55:18 +02:00
Andy Wingo
08296e6022 Remove last vestiges of ia64 support
* configure.ac:
* libguile/continuations-internal.h (struct scm_continuation):
* libguile/continuations.c (capture_auxiliary_stack)
(restore_auxiliary_stack, scm_i_make_continuation, copy_stack_and_call):
* libguile/gen-scmconfig.c (main):
* libguile/threads.h (struct scm_thread): Remove support for aux stacks.
2025-06-25 12:55:18 +02:00
Andy Wingo
4b2924730e Excise scm_words from struct.c
* libguile/struct.h (SCM_VTABLE_BASE_LAYOUT): Update for unboxed-fields
representation change.
* libguile/struct.c (scm_i_alloc_struct, scm_make_struct_simple): Use
scm_allocate_tagged.
2025-06-25 12:55:18 +02:00
Andy Wingo
91ba12f444 Fix vtable base layout
* libguile/struct.h (SCM_VTABLE_BASE_LAYOUT): Update for unboxed-fields
representation change.
* module/oop/goops.scm (fold-class-slots): Likewise.
2025-06-25 12:55:12 +02:00
Andy Wingo
bd1e5ff688 Switch unboxed-fields bitmask to be a Scheme integer
Requires a full rebuild!!

* libguile/struct.h (SCM_VTABLE_UNBOXED_FIELDS):
(SCM_VTABLE_FIELD_IS_UNBOXED): Use logbit? to determine if a field is
unboxed.
* module/language/cps/guile-vm/lower-primcalls.scm
(vtable-has-unboxed-fields?): Just check against SCM_INUM0.
(vtable-field-boxed?): Likewise, the bitmask is an integer.
* libguile/struct.c (set_vtable_access_fields): Set UNBOXED_FIELDS
bitmask as integer.
2025-06-24 15:05:28 +02:00
Andy Wingo
1c092eb413 Give structs a "struct scm_struct"
* libguile/modules.h (SCM_MODULE_OBARRAY):
(SCM_MODULE_USES):
(SCM_MODULE_BINDER):
(SCM_MODULE_EVAL_CLOSURE):
(SCM_MODULE_TRANSFORMER):
(SCM_MODULE_DUPLICATE_HANDLERS):
(SCM_MODULE_IMPORT_OBARRAY): Use SCM_STRUCT_SLOT_REF instead of
SCM_STRUCT_SLOTS.
* libguile/struct.h (scm_is_struct):
(scm_to_struct):
(scm_from_struct):
(scm_i_struct_vtable):
(scm_i_struct_ref_scm):
(scm_i_struct_set_scm):
(scm_i_struct_ref_raw):
(scm_i_struct_set_raw): New helpers.
(SCM_STRUCTP):
(SCM_STRUCT_SLOT_REF):
(SCM_STRUCT_SLOT_SET):
(SCM_STRUCT_DATA_REF):
(SCM_STRUCT_DATA_SET): Use new helpers.
(SCM_STRUCT_DATA):
(SCM_STRUCT_SLOTS): Remove.
(SCM_SET_VTABLE_FLAGS): Fix for SCM_STRUCT_SLOT_REF not being lvalue.
2025-06-24 13:58:14 +02:00
Andy Wingo
c2f451bf57 Remove unused internal inline allocation functions
* libguile/gc-inline.h (scm_inline_cell, scm_inline_double_cell)
(scm_inline_words, scm_inline_gc_malloc_pointerless, scm_inline_gc_malloc)
(scm_inline_gc_malloc_words, scm_inline_gc_malloc_pointerless_words):
Remove.
2025-06-24 11:41:49 +02:00
Andy Wingo
5d9d84b68e Remove internal scm_inline_cons
* libguile/gc-inline.h (scm_inline_cons): Remove.
* libguile/vm.c (cons): Inline use.
2025-06-24 11:37:50 +02:00
Andy Wingo
a478665ab6 Move vectors off scm_words
Also move most internal vector representation into a private header
file.

* libguile/vectors-internal.h: New file.
* libguile/vectors.h (SCM_I_IS_MUTABLE_VECTOR, SCM_I_VECTOR_WELTS)
(SCM_I_VECTOR_ELTS, SCM_I_VECTOR_LENGTH): Remove these internal
definitions.
* libguile/vectors.c: Adapt to use new data types.
* libguile/eval.c: Include internal file.
* libguile/init.c: Include internal file.
* libguile/array-handle.c (scm_array_get_handle): Use new functions.
2025-06-24 11:20:38 +02:00
Andy Wingo
7dfbb8bc4b Inline scm_is_vector
* libguile/vectors.h (scm_is_vector): Define inline.
(SCM_I_IS_VECTOR): Remove.
* libguile/eval.c (env_tail): Use scm_is_vector.
* libguile/vectors.c (scm_is_vector): Remove.
2025-06-24 10:54:22 +02:00
Andy Wingo
05e868892b Deprecate SCM_SIMPLE_VECTOR_REF et al
* libguile/vectors.h:
* libguile/deprecated.c:
* libguile/deprecated.h (SCM_SIMPLE_VECTOR_LENGTH):
(SCM_SIMPLE_VECTOR_REF):
(SCM_SIMPLE_VECTOR_SET): Deprecate.
2025-06-24 10:52:31 +02:00
Andy Wingo
da51198ce8 Fix a couple SCM_SIMPLE_VECTOR stragglers
* libguile/filesys.c (retrieve_select_type):
* libguile/hashtab.c (rehash):
* libguile/posix.c (scm_uname):
* libguile/vectors.c (scm_c_vector_set_x):
(scm_c_make_vector): Fix some SCM_SIMPLE_VECTOR users.
2025-06-24 10:52:27 +02:00
Andy Wingo
617344f822 Switch all users of SCM_SIMPLE_VECTOR_SET to scm_c_vector_set_x
* libguile/eval.c:
* libguile/filesys.c:
* libguile/hashtab.c:
* libguile/memoize.c:
* libguile/net_db.c:
* libguile/ports-internal.h:
* libguile/ports.c:
* libguile/posix.c:
* libguile/print.c:
* libguile/regex-posix.c:
* libguile/scmsigs.c:
* libguile/socket.c:
* libguile/stime.c:
* libguile/strports.c: Use C function instead of macro.
2025-06-24 10:40:40 +02:00
Andy Wingo
4dedc48cfb Switch all users of SCM_SIMPLE_VECTOR_REF to scm_c_vector_ref
* libguile/arrays.c:
* libguile/eval.c:
* libguile/filesys.c:
* libguile/hashtab.c:
* libguile/intrinsics.c:
* libguile/memoize.c:
* libguile/modules.c:
* libguile/poll.c:
* libguile/ports-internal.h:
* libguile/posix.c:
* libguile/print.c:
* libguile/scmsigs.c:
* libguile/socket.c:
* libguile/stime.c:
* libguile/strports.c:
* libguile/vectors.c: Use C function instead of macro.
2025-06-24 10:32:14 +02:00
Andy Wingo
d73c675fa6 Switch all users of SCM_SIMPLE_VECTOR_LENGTH to scm_c_vector_length
* libguile/arrays.c:
* libguile/eval.c:
* libguile/filesys.c:
* libguile/hash.c:
* libguile/hashtab.c:
* libguile/memoize.c:
* libguile/modules.c:
* libguile/poll.c:
* libguile/posix.c:
* libguile/print.c:
* libguile/socket.c:
* libguile/stime.c: Use C function instead of macro.
2025-06-24 09:59:24 +02:00
Andy Wingo
0a5d2ffb1a Move foreign pointers off scm_words
* libguile/foreign.h: Give pointers a struct type.  Adapt to use it
internally.
* libguile/foreign.c: Allocate pointers with scm_allocate_tagged.
2025-06-24 09:27:44 +02:00
Andy Wingo
61af4d201a Syntax uses scm_allocate_tagged
* libguile/syntax.c: Define a "struct scm_syntax".  Use it instead of
scm_words and SCM_CELL_OBJECT.
2025-06-23 21:06:31 +02:00
Andy Wingo
a5f9d0da6a Vm creates values with scm_allocate_tagged
* libguile/vm-engine.c (halt): Make values with scm_allocate_tagged.
2025-06-23 20:45:00 +02:00
Andy Wingo
20fcb8ac12 Convert hash tables away from scm_cell
* libguile/hashtab.h (SCM_HASHTABLE_VECTOR):
(SCM_SET_HASHTABLE_VECTOR):
(SCM_HASHTABLE):
(SCM_HASHTABLE_N_ITEMS):
(SCM_SET_HASHTABLE_N_ITEMS):
(SCM_HASHTABLE_INCREMENT):
(SCM_HASHTABLE_DECREMENT):
(SCM_HASHTABLE_UPPER):
(SCM_HASHTABLE_LOWER):
(SCM_HASHTABLE_N_BUCKETS):
(SCM_HASHTABLE_BUCKET):
(SCM_SET_HASHTABLE_BUCKET): Remove these internal definitions from the
public interface.
(scm_t_hashtable): Add a tag, and add buckets.
(scm_is_hashtable):
(scm_to_hashtable):
(scm_from_hashtable): New helpers.
* libguile/modules.c (scm_module_reverse_lookup): Adapt to hash table
API change.
* libguile/hashtab.c: Rework to access hash table data through the typed
"struct scm_t_hashtable".
2025-06-23 20:44:55 +02:00
Andy Wingo
b25a743cf9 Get strings, symbols, stringbufs off scm_double_cell
* libguile/symbols.h (scm_is_symbol, scm_to_symbol, scm_from_symbol):
Define some helpers and a "struct scm_symbol".
* libguile/strings-internal.h (scm_i_string_data): Remove.
* libguile/print.c (write_char_in_string, write_narrow_string)
(write_wide_string): Refactor to avoid per-char narrow checks.
(write_character): Move up.
(iprin1): Adapt to call write_narrow_string / write_wide_string.
* libguile/srfi-13.c (scm_string_eq): Avoid scm_i_string_data.
* libguile/strings.c (scm_is_stringbuf, scm_to_stringbuf)
(scm_from_stringbuf, stringbuf_is_wide, stringbuf_is_narrow)
(stringbuf_is_mutable, stringbuf_set_mutable, stringbuf_length)
(as_narrow_stringbuf, as_wide_stringbuf, narrow_stringbuf_chars)
(wide_stringbuf_chars, scm_to_string, scm_from_string, string_is_read_only)
(string_is_shared, string_stringbuf, string_aliased_string, string_start)
(string_length): New inline function helpers, to replace a pile of
macros.  Adapt all users.
2025-06-23 15:00:09 +02:00
Andy Wingo
c8cd88b533 Remove SCM_IMMUTABLE_CELL, SCM_IMMUTABLE_DOUBLE_CELL
* libguile/snarf.h (SCM_IMMUTABLE_CELL):
(SCM_IMMUTABLE_DOUBLE_CELL): Remove.  No longer used.  Hopefully there
are no direct external users!
2025-06-23 15:00:09 +02:00
Andy Wingo
02c2516b35 Remove SCM_IMMUTABLE_POINTER
* libguile/foreign.h (SCM_IMMUTABLE_POINTER): Remove.  This was part of
the implementation of static subrs, a long long time ago, but hasn't
been used since 2013 (27337b6373).
2025-06-23 15:00:09 +02:00
Andy Wingo
c370d12d03 Better type-safety for snarfed immutable strings
* libguile/strings.h: Add struct types for stringbufs and strings.
(SCM_IMMUTABLE_STRINGBUF, SCM_IMMUTABLE_STRING): Use the new data types.
2025-06-23 15:00:04 +02:00
Andy Wingo
4702becf89 Move internal string interface definitions to internal header
* libguile/strings-internal.h: New file.
* libguile/strings.h: Gut.
* libguile/Makefile.am: Add new file.
* libguile/array-handle.c:
* libguile/bytevectors.c:
* libguile/foreign.c:
* libguile/fports.c:
* libguile/hash.c:
* libguile/i18n.c:
* libguile/init.c:
* libguile/intrinsics.c:
* libguile/load.c:
* libguile/memoize.c:
* libguile/numbers.c:
* libguile/ports.c:
* libguile/posix.c:
* libguile/print.c:
* libguile/random.c:
* libguile/rdelim.c:
* libguile/read.c:
* libguile/rw.c:
* libguile/srfi-13.c:
* libguile/srfi-14.c:
* libguile/strings.c:
* libguile/strports.c:
* libguile/struct.c:
* libguile/symbols.c:
* libguile/throw.c: Include new file.
2025-06-23 08:44:24 +02:00
Andy Wingo
342a58ad36 scm_is_string is a normal inline function
* libguile/strings.h (scm_is_string): Change to be static inline.
* libguile/inline.c: No need to include strings.h
2025-06-23 08:44:24 +02:00
Andy Wingo
9fd851da65 Get fractions off scm_double_cell
* libguile/numbers.h (scm_t_double, scm_t_complex): Change type and pad
to scm_t_bits.
(struct scm_fraction): New type.
(scm_is_fraction, scm_to_fraction, scm_from_fraction)
(scm_fraction_numerator, scm_fraction_denominator): New helpers.
(SCM_FRACTIONP, SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR): Use
new helpers.
* libguile/numbers.c (scm_i_make_ratio_already_reduced): Allocate using
scm_allocate_tagged.
2025-06-23 08:44:24 +02:00
Andy Wingo
7a749ef79c SCM_ALIGNED is always available
_Alignas is C11.

* libguile/scm.h (SCM_ALIGNED): Always present.
* libguile/snarf.h:
* libguile/strings.h:
* libguile/symbols.h: Always have SCM_ALIGNED available.
2025-06-20 22:18:46 +02:00
Andy Wingo
9290698977 Move atomic box off of scm_cell
* libguile/Makefile.am:
* libguile/atomic.h: Make private.  Define "struct scm_atomic_box".
* libguile/atomic.c: Allocate scm_atomic_box via scm_allocate_tagged.
2025-06-20 16:23:02 +02:00
Andy Wingo
796798b400 Move variables off of scm_cell
* libguile/variable.h:
* libguile/variable.c: Define a "struct scm_variable" and allocate it
via scm_allocate_tagged.
2025-06-20 16:11:07 +02:00
Andy Wingo
b262df6ca7 Move keywords off of scm_cell
* libguile/keywords-internal.h: New file.
* libguile/Makefile.am (noinst_HEADERS): Add new file.
* libguile/hash.c:
* libguile/init.c:
* libguile/keywords.c: Include new file.
(scm_symbol_to_keyword): Allocate via scm_allocate_tagged.
2025-06-20 15:57:37 +02:00
Andy Wingo
27caa4cb98 Move SCM_CARLOC, SCM_CDRLOC to pairs.h
* libguile/gc.h:
* libguile/pairs.h (scm_pair_car_loc, scm_pair_cdr_loc): New helpers.
(SCM_CARLOC, SCM_CDRLOC): Move here from gc.h.
* libguile/list.c (scm_list_1, scm_list_2, scm_list_3): Just use
scm_cons.
2025-06-20 15:46:57 +02:00
Andy Wingo
7997496a32 Move pairs off of scm_cell
* libguile/pairs.h: Remove inline scm_cons, scm_car, scm_cdr defnitions;
this is less important now with the VM.  Add a "struct scm_pair", and
make all SCM_CAR / SCM_CDR checks use it.  For now it does type checking
as well.
* libguile/pairs.c (scm_cons, scm_car, scm_cdr): Implement here.
* libguile/scm.h (SCM_DEBUG_PAIR_ACCESSES): No more macro!
2025-06-20 15:33:33 +02:00
Andy Wingo
fbbe5fa873 Move dynamic states off of scm_cell
* libguile/fluids-internal.h: Add struct scm_dynamic_state_snapshot
definition.
* libguile/fluids.h (scm_is_dynamic_state): Inline.
* libguile/fluids.c: Use "struct scm_dynamic_state_snapshot".
2025-06-20 14:56:28 +02:00
Andy Wingo
453fe41a26 Move fluids off of scm_cell
* libguile/fluids-internal.h: New file for internal definitions.
* libguile/dynstack.c:
* libguile/init.c:
* libguile/intrinsics.c:
* libguile/modules.c:
* libguile/print.c:
* libguile/threads.c: Include new internal file.
* libguile/fluids.c: Use "struct scm_fluid".
* libguile/Makefile.am: Add new file.
2025-06-20 14:43:10 +02:00
Andy Wingo
8141c35ec4 Change to not inline scm_cell / scm_double_cell / scm_words
* libguile/gc-malloc.c (scm_cell):
(scm_double_cell):
(scm_words): Implement here.
* libguile/gc.h:
* libguile/inline.c: Not here.
2025-06-20 14:23:56 +02:00
Andy Wingo
4bb5fc526b Remove unused variable in hashtab.c
* libguile/hashtab.c:
2025-06-20 14:22:39 +02:00
Andy Wingo
d8c1ea4049 Convert smobs to use scm_allocate_*
* libguile/smob.c (scm_new_smob, scm_new_double_smob): Use
scm_allocate_pointerless, scm_allocate_tagged, or scm_allocate_sloppy,
as appropriate.
2025-06-20 13:03:06 +02:00
Andy Wingo
c800496d27 Use alloca in change_option_setting
* libguile/options.c (change_option_setting): alloca instead of
scm_allocate_sloppy.
2025-06-20 12:48:07 +02:00
Andy Wingo
f2ad6525e6 Convert scm_gc_malloc* calls to scm_allocate*
* libguile/arrays.c:
* libguile/bitvectors.c:
* libguile/bytevectors.c:
* libguile/chooks.c:
* libguile/continuations.c:
* libguile/control.c:
* libguile/dynstack.c:
* libguile/ephemerons.c:
* libguile/filesys.c:
* libguile/foreign.c:
* libguile/fports.c:
* libguile/frames.c:
* libguile/gsubr.c:
* libguile/hashtab.c:
* libguile/i18n.c:
* libguile/integers.c:
* libguile/intrinsics.c:
* libguile/load.c:
* libguile/loader.c:
* libguile/macros.c:
* libguile/numbers.c:
* libguile/options.c:
* libguile/ports.c:
* libguile/programs.h:
* libguile/random.c:
* libguile/read.c:
* libguile/regex-posix.c:
* libguile/smob.c:
* libguile/srfi-14.c:
* libguile/strings.c:
* libguile/struct.c:
* libguile/threads.c:
* libguile/threads.h:
* libguile/values.c:
* libguile/vm.c: Convert all calls to scm_gc_malloc_pointerless to
scm_allocate_pointerless.  Convert scm_gc_malloc to either
scm_allocate_tagged or scm_allocate_sloppy, depending on whether the
value can be precisely traced or not.
2025-06-20 11:40:01 +02:00
Andy Wingo
290a57b1b0 Add scm_allocate_{pointerless,tagged,sloppy}
* libguile/gc-inline.h (scm_inline_allocate_pointerless):
(scm_inline_allocate_tagged):
(scm_inline_allocate_sloppy):
* libguile/gc.h:
* libguile/gc-malloc.c (scm_allocate_pointerless):
(scm_allocate_tagged):
(scm_allocate_sloppy): New functions.
(scm_gc_malloc):
(scm_gc_malloc_pointerless): Dispatch to scm_allocate functions.
2025-06-20 11:07:34 +02:00
Andy Wingo
a793d371cd Move string-pointer-array handling to posix.c
* libguile/posix.c (free_string_pointers):
(free_string_pointers_on_unwind):
(allocate_string_pointers): Move here from string.c, and use malloc/free
instead of GC facilities. Adapt all users.
* libguile/strings.h:
* libguile/strings.c (scm_i_allocate_string_pointers): Remove.
2025-06-20 11:06:41 +02:00
Andy Wingo
ce2f7847e8 Avoid untagged traced allocation in make-struct/no-tail
* libguile/struct.c (scm_struct_init_1_default):
(scm_struct_init_1): New helpers.
(scm_struct_init_array): Use new helpers.
(scm_struct_init_list): New function.
(scm_make_struct_no_tail): Use scm_struct_init_list instead of mallocing.
2025-06-20 09:27:47 +02:00
Andy Wingo
4d15cb7e6d JIT uses malloc/free instead of gc_malloc
* libguile/jit.c (initialize_thread_jit_state):
(scm_jit_state_free): Use malloc/free, to avoid needing to mark things.
2025-06-19 16:56:30 +02:00
Andy Wingo
278ba99027 Allow precise tracing of dynstacks
Gosh this was a slog

* libguile/dynstack.c (dynstack_ensure_space): Use malloc and free.
Threads have off-heap dynstacks, with manual marking.
(scm_trace_dynstack): Implement tracing.
(trace_pinned_trampoline, scm_trace_dynstack_roots): Implement tracing
for active threads.
(scm_dynstack_capture): Tag dynstacks.
* libguile/dynstack.h (scm_t_dynstack): Add a tag.
(scm_t_dynstack_winder_flags): Add SCM_F_DYNSTACK_WINDER_MANAGED.
* libguile/dynwind.h (scm_t_wind_flags): Add SCM_F_WIND_MANAGED.
* libguile/dynwind.c (scm_dynwind_unwind_handler_with_scm)
(scm_dynwind_rewind_handler_with_scm): These values need to be traced by
GC.
* libguile/scm.h (scm_tc16_dynstack_slice): New typecode.  No need for
equality etc because it shouldn't escape to Scheme (currently).
* libguile/trace.h: Add trace decls.
* libguile/threads.c (scm_trace_thread_roots): Trace dynstacks
explicitly here, as they are off-heap.
2025-06-19 16:32:56 +02:00
Andy Wingo
923bfdc7ed String ports have managed streams
* libguile/strports.c (stream_bytevector, stream_pos, stream_len)
(stream_set_bytevector, stream_set_pos, stream_set_len)
(make_stream): New helpers.
* libguile/strports.c (string_port_read):
(string_port_write):
(string_port_seek):
(string_port_truncate):
(scm_mkstrport):
(scm_strport_to_string): Adapt.
(scm_make_string_port_type): Indicate that the stream is managed.
2025-06-18 16:33:36 +02:00
Andy Wingo
765245119b Rework representation of ports
Instead of a 4-word object that has a tag, stream, pt, and ptob, just
add tag, stream, and ptob fields to pt.  Also add a "stream mode",
indicating to the GC how the stream should be traced.

* libguile/custom-ports.c (scm_init_custom_ports): Indicate that streams
are managed.
* libguile/fports.c (scm_make_fptob): Streams are managed.
* libguile/ports-internal.h (scm_t_port_type): Add enum to indicate
stream management.
(scm_t_port): Add type-and-flags, stream, and ptob members.
* libguile/ports.c (scm_port_stream, scm_port_type): New helpers.
(scm_make_port_type): Init stream mode to CONSERVATIVE.
(scm_set_port_stream_mode): New API.
(scm_c_make_port_with_encoding): Adapt to new port representation.
(scm_init_ports): Void ports have unmanaged streams.
* libguile/ports.h (scm_is_port, scm_to_port, scm_from_port): New inline
functions.
(SCM_PORT, SCM_STREAM, SCM_PORT_TYPE): Rework in terms of new functions.
(SCM_SETSTREAM): Remove.
(enum scm_port_stream_mode): New.
(scm_set_port_stream_mode): New.
2025-06-18 16:30:03 +02:00
Andy Wingo
c74499a7e5 Add new API for declaring managed SMOB fields
* libguile/smob.h:
* libguile/smob.c (scm_make_managed_smob_type): New API, to declare that
a SMOB has a certain number of fields, all of which will be traced by
the GC.  0 indicates "unknown", and will disable evacuation.
(scm_make_smob_type): Call scm_make_managed_smob_type with 0 nfields.
(scm_set_smob_field_is_unmanaged): New API to indicate that a field is
unmanaged (and should not be traced by GC).
2025-06-18 14:59:03 +02:00
Andy Wingo
bc43d4f9a7 Locale have static tc16
* libguile/print.c (iprin1):
* libguile/eq.c (scm_equal_p): Add case for locales and also regexps
which we missed in the past.
* libguile/finalizers.h:
* libguile/finalizers.c (scm_i_add_locale_finalizer):
(run_finalizer): Add locale finalizers.
* libguile/scm.h (scm_tc16_locale): New tc16.
* module/oop/goops.scm:
* libguile/goops.c: Add locale class.
* libguile/i18n.c: Give locale objects their own tc16.
2025-06-18 12:18:24 +02:00
Andy Wingo
a5c70aa914 Simplify i18n.c to require POSIX 2008 newlocale, uselocale
* libguile/i18n.c: Remove shim for pre-POSIX 2008, given that gnulib
does appear to have newlocale/uselocale implementations.
* libguile/posix.c: No USE_GNU_LOCALE_API define.
* libguile/r6rs-ports.c: Remove stray include.
2025-06-18 12:02:41 +02:00
Andy Wingo
3f4048f6c8 Move transcoded ports implementation to Scheme
* libguile/r6rs-ports.c: Remove private transcoded ports implementation.
* module/ice-9/binary-ports.scm: Remove stale comment.
* module/rnrs/io/ports.scm (%make-transcoded-port): New implementation
based on custom ports.
2025-06-18 11:06:12 +02:00