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

197 commits

Author SHA1 Message Date
Ludovic Courtès
696ac4dfcc Slightly improve comments and style in `struct.c'.
* libguile/struct.c (scm_i_struct_inherit_vtable_magic): Comment.
  Punctuate comments within the body, have them follow GCS.
  (scm_make_vtable_vtable): Clarify comments.
2010-01-23 16:41:28 +01:00
Ludovic Courtès
01e74380f6 Clarify GC-registered displacements for structs.
* libguile/struct.c (scm_init_struct): Remove unneeded
  `GC_REGISTER_DISPLACEMENT ()' call.  Comment the remaining one.
2010-01-23 16:39:14 +01:00
Ludovic Courtès
aa42c03669 Optimize struct initialization and accessors for the common case.
* libguile/struct.c (set_vtable_layout_flags): New function.
  (scm_i_struct_inherit_vtable_magic): Use it.
  (scm_struct_init): Optimize the case where HANDLE's vtable has the
  `SCM_VTABLE_FLAG_SIMPLE' flag.
  (scm_struct_ref): Likewise.
  (scm_struct_ref): Likewise, when `SCM_VTABLE_FLAG_SIMPLE_RW' is also set.

* libguile/struct.h (SCM_VTABLE_BASE_LAYOUT): Update comment for the
  next-to-last hidden field.
  (scm_vtable_index_reserved_6): Rename to...
  (scm_vtable_index_size): ... this.
  (SCM_VTABLE_FLAG_RESERVED_0): Rename to...
  (SCM_VTABLE_FLAG_SIMPLE): ... this.
  (SCM_VTABLE_FLAG_RESERVED_1): Rename to...
  (SCM_VTABLE_FLAG_SIMPLE_RW): ... this.

* test-suite/tests/structs.test ("low-level struct
  procedures")["struct-ref", "struct-set!", "struct-ref out-of-range",
  "struct-set! out-of-range"]: New tests.
2010-01-23 16:21:13 +01:00
Andy Wingo
96a44c1cab scm_i_alloc_struct does not take a "what" arg
* libguile/struct.h:
* libguile/struct.c (scm_i_alloc_struct): Change to not take a "what"
  argument. Callers changed.
2009-12-08 23:13:20 +01:00
Andy Wingo
db5ed68588 make some applicable struct vtable-vtable public to C
* libguile/struct.h (scm_standard_vtable_vtable)
  (scm_applicable_struct_vtable_vtable)
  (scm_applicable_struct_with_setter_vtable_vtable)
* libguile/struct.c: Make these stock meta-tables public to C.
2009-12-08 23:13:13 +01:00
Andy Wingo
66e78727d6 add scm_c_make_struct[v]
* libguile/struct.h (scm_c_make_struct, scm_c_make_structv): New
  functions with which you can make a struct without consing a rest
  list.

* libguile/struct.c (scm_struct_init): Refactor to take an array of init
  values, not a list.
  (scm_make_struct, scm_make_vtable_vtable): Pull the rest arg out into
  a list and pass it down to the new array-taking functions.

* libguile/memoize.c: Remove a neeless #include <alloca>.
2009-12-07 11:21:59 +01:00
Andy Wingo
1be8532fdb some scm_i_init_guile cleanups
* libguile/init.c (scm_i_init_guile): Since hash tables are tc7 objects,
  things that depend on hash tables no longer depend on smobs, so move
  smob_prehistory up a bit. No more struct_prehistory.

* libguile/struct.h:
* libguile/struct.c (scm_struct_prehistory): Remove empty function.
2009-12-05 11:16:54 +01:00
Andy Wingo
51f66c9120 limn goops flags, remove foreign objs, rename entity to applicable-struct
* libguile/goops.c (scm_class_applicable_struct)
  (scm_class_applicable_struct_with_setter)
  (scm_class_applicable_struct_class): Rename from
  scm_class_entity, scm_class_entity_with_setter, and
  scm_class_entity_class.
  (scm_class_simple_method): Removed; this abstraction is not used.
  (scm_class_foreign_class, scm_class_foreign_object): Remove these,
  they are undocumented and unused. They might come back later.
  (scm_sys_inherit_magic_x): Simply inherit the vtable flags from the
  class's class. Flags are about layout, and it is the class that
  determines the layout of the instance.
  (scm_basic_basic_make_class): Don't bother setting GOOPS_OR_VALID,
  inherit-magic will do that.
  (scm_basic_make_class): Inherit magic after setting the layout. Allows
  the struct magic checker to do its job.
  (scm_accessor_method_slot_definition): Move implementation to Scheme.
  Removes the need for the accessor flag.
  (scm_sys_allocate_instance): Adapt to scm_i_alloc_struct name change,
  and that alloc-struct will handle finalization.
  (scm_compute_applicable_methods): Remove accessor check, as it's
  unnecessary.
  (scm_make): Adapt to new generic slot order, and no more
  simple-method.
  (create_standard_classes): What was the GF slot "dispatch-procedure"
  is now the applicable-struct slot "procedure". No more foreign class,
  foreign object, or simple method. Rename <entity> and friends to
  <applicable-struct> and friends. No more entity-with-setter -- though
  perhaps it will come back too. Instead generic-with-setter is its own
  thing.

* libguile/goops.h (SCM_CLASSF_METACLASS): "A goops class that is a
  vtable" -- no need for a separate flag.
  (SCM_CLASSF_FOREIGN, SCM_CLASSF_SIMPLE_METHOD)
  (SCM_CLASSF_ACCESSOR_METHOD): Removed these unused flags.
  (SCM_ACCESSORP): Removed.
  Renumber generic slots, rename entity classes, and remove the foreign
  class, foreign object, and simple method classes.

* libguile/struct.c (scm_i_struct_inherit_vtable_magic): New function,
  called when making new vtables.applicable structs
  (scm_i_alloc_struct): Remove 8-bit alignment check, as libGC
  guarantees this for us. Handle finalizer registration here.
  (scm_make_struct): Factor some things to scm_i_alloc_struct and
  scm_i_struct_inherit_vtable_magic.
  (scm_make_vtable_vtable): Adapt to scm_i_alloc_struct name change.

* libguile/struct.h (scm_i_alloc_struct): Change name from
  scm_alloc_struct, and make internal.

* module/oop/goops.scm (oop): Don't declare #:replace <class> et al,
  because <class> isn't defined in the core any more.
  (accessor-method-slot-definition): Defined in Scheme now.
  Remove <foreign-object> methods.
  (initialize on <class>): Prep layout before inheriting magic, as in
  scm_basic_make_class.

* module/oop/goops/dispatch.scm (delayed-compile)
  (memoize-effective-method!): Adapt to 'procedure slot name change.
2009-11-26 00:25:07 +01:00
Andy Wingo
b6cf4d0265 a very big commit cleaning up structs & goops. also applicable structs.
I tried to split this one, and I know it's a bit disruptive, but this
stuff really is one big cobweb. So instead we'll pretend like these are
separate commits, by separating the changelog.

Applicable struct runtime support.

* libguile/debug.c (scm_procedure_source):
* libguile/eval.c (scm_trampoline_0, scm_trampoline_1)
  (scm_trampoline_2):
* libguile/eval.i.c (CEVAL):
* libguile/goops.c (scm_class_of):
* libguile/procprop.c (scm_i_procedure_arity):
* libguile/procs.c (scm_procedure_p, scm_procedure, scm_setter): Allow
  for applicable structs. Whee!

* libguile/deprecated.h (scm_vtable_index_vtable): Define as a synonym
  for scm_vtable_index_self.
  (scm_vtable_index_printer): Alias scm_vtable_index_instance_printer.
  (scm_struct_i_free): Alias scm_vtable_index_instance_finalize.
  (scm_struct_i_flags): Alias scm_vtable_index_flags.
  (SCM_STRUCTF_FLAGS): Be a -1 mask, we have a whole word now.
  (SCM_SET_VTABLE_DESTRUCTOR): Implement by hand.

Hidden slots.

* libguile/struct.c (scm_make_struct_layout): Add support for "hidden"
  fields, writable fields that are not visible to make-struct. This
  allows us to add fields to vtables and not break existing make-struct
  invocations.
  (scm_struct_ref, scm_struct_set_x): Always get struct length from the
  vtable. Support hidden fields.

* libguile/goops.c (scm_class_hidden, scm_class_protected_hidden): New
  slot classes, to correspond to the new vtable slots.
  (scm_sys_prep_layout_x): Turn hidden slots into 'h'.
  (build_class_class_slots): Reorder the class slots to account for
  vtable fields coming out of negative-land, for name as a vtable slot,
  and for hidden fields.
  (create_standard_classes): Define <hidden-slot> and
  <protected-hidden-slot>.

Clean up struct.h.

* libguile/struct.h: Lay things out cleaner. There are no more hidden
  (negative) words. Names are nicer. The exposition is nicer. But the
  basics are the same. The incompatibilities are that <vtable> has more
  slots now, and that scm_alloc_struct's signature has changed. The
  former is ameliorated by the "hidden" slots mentioned before, and the
  latter, well, it was always a very internal thing...
  (scm_t_struct_finalize): New type, a finalizer function to be run when
  instances of a vtable are collected.
  (scm_t_struct_free): Removed, structs' data is managed by the GC now,
  and not freed by vtable functions.

* libguile/struct.c: (scm_vtable_p): Now we keep flags on
  vtable-vtables, so this check is cheaper.
  (scm_alloc_struct): No hidden words. Yippee.
  (struct_finalizer_trampoline): Entersify.
  (scm_make_struct): No need to babysit extra words, though now we have
  to babysit flags. Propagate the vtable, applicable, and setter flags
  appropriately.
  (scm_make_vtable_vtable): Update for new simplicity.
  (scm_print_struct): A better printer.
  (scm_init_struct): Define <applicable-struct-vtable>, a magical vtable
  like CL's funcallable-standard-class. Also define
  <applicable-struct-with-setter-vtable>.

Remove foreign object implementation.

* libguile/goops.h:
* libguile/goops.c (scm_make_foreign_object, scm_make_class)
  (scm_add_slot, scm_wrap_object, scm_wrap_component): Remove, these
  were undocumented and unworking.

Clean up goops.h, a little.

* libguile/goops.h:
* libguile/goops.c: Also clean up.
* module/oop/goops/dispatch.scm (hashset-index): Adapt for new hashset
  index.
2009-11-26 00:24:58 +01:00
Ludovic Courtès
7f991c7d32 Fix C99-style declarations after statements.
* libguile/eval.i.c (ceval): Move declarations before statements.

* libguile/read.c (scm_read_extended_symbol): Likewise.

* libguile/struct.c (scm_make_struct_layout): Likewise.

* libguile/threads.c (fat_mutex_unlock): Likewise.

* libguile/vm-i-system.c (br_if_nargs_ne, br_if_nargs_lt): Likewise.

* libguile/vm.c (make_vm): Likewise.
2009-11-17 23:13:58 +01:00
Andy Wingo
11561496ba remove support for "entities" -- a form of applicable struct
Entities were meant to be a form of applicable struct. Unfortunately,
the implementation is intertwingled with generics. Removing them, for
now, will make it possible to cleanly re-add applicable struct support.

* libguile/struct.h (SCM_STRUCTF_ENTITY): Remove.
  (SCM_STRUCTF_GOOPS_HACK): New flag; sigh.
* libguile/struct.c (scm_make_struct): We make "entity" structs if the
  GOOPS_HACK flag is set. This will be fixed when we rework flags and
  remove hidden words.

* libguile/goops.c (scm_class_of): Structs are not applicable, for now
  at least.
  (scm_sys_inherit_magic_x, scm_basic_basic_make_class)
  (scm_sys_allocate_instance, scm_sys_set_object_setter_x):
  (make_struct_class): Adapt for no more entities (and thus no entity
  flag).
  (create_standard_classes): For some reason, generic functions were
  getting the LIGHT flag set, after the ENTITY flag was removed; so for
  now explicitly clear that flag.
* libguile/goops.h (SCM_GENERIC_SETTER, SCM_SET_GENERIC_SETTER): New
  macros.

* libguile/objects.h:
* libguile/objects.c: Remove code for entities.

* libguile/debug.c: (scm_procedure_source): Only work with generics.

* libguile/eval.c (scm_trampoline_0, scm_trampoline_1)
  (scm_trampoline_2): Only handle generics.

* libguile/eval.i.c (CEVAL): #ifdef out the pieces about entities.

* libguile/procprop.c (scm_i_procedure_arity): Remove support for
  entities.

* libguile/procs.c (scm_procedure_p, scm_procedure, scm_setter): Remove
  entity support.
2009-11-15 20:28:11 +01:00
Ludovic Courtès
d587c9e8b2 Use proper types for hash/assoc functions in `hashtab.h'.
Partly fixes bug #23681 ("Function declarators with empty parentheses
should not be used").

* libguile/goops.c (scm_wrap_component): Cast `scm_sloppy_assq'.

* libguile/hashtab.c (scm_hash_fn_get_handle): Update to take functions
  of type `scm_t_hash_fn' and `scm_t_assoc_fn'.  Update callers.
  (scm_ihashx): Change to match `scm_t_hash_fn'.
  (scm_sloppy_assx): Change to match `scm_t_assoc_fn'.

* libguile/hashtab.h (scm_t_hash_fn, scm_t_assoc_fn): New types.
  (scm_t_hashtable)[hash_fn]: Change to `scm_t_hash_fn'.
  (scm_i_rehash, scm_hash_fn_get_handle, scm_hash_fn_create_handle_x,
  scm_hash_fn_ref, scm_hash_fn_set_x, scm_hash_fn_remove_x): Change to
  take `scm_t_hash_fn' and `scm_t_assoc_fn' parameters.

* libguile/srcprop.h (scm_whash_get_handle, scm_whash_create_handle,
  scm_whash_lookup): Implement in terms of `scm_hashq_*' instead of
  `scm_hash_fn_*'.

* libguile/struct.c (scm_struct_ihashq): Change to match
  `scm_t_hash_fn'.
  (scm_struct_create_handle): Cast `scm_sloppy_assq'.

* libguile/struct.h (scm_struct_ihashq): Update, make internal.
2009-10-20 00:10:18 +02:00
Ludovic Courtès
1c44468d77 Rename "boehm-gc.h" to "bdw-gc.h"; add to the distribution.
* libguile/Makefile.am (modinclude_HEADERS): Add `bdw-gc.h'.

* libguile/bdw-gc.h: Rename from "boehm-gc.h"; users updated.  Update to
  LGPLv3+.
2009-09-14 00:42:25 +02:00
Ludovic Courtès
7af531508c Merge branch 'master' into boehm-demers-weiser-gc
Conflicts:
	libguile/Makefile.am
	libguile/bytevectors.c
	libguile/gc-card.c
	libguile/gc-mark.c
	libguile/programs.c
	libguile/srcprop.c
	libguile/srfi-14.c
	libguile/symbols.c
	libguile/threads.c
	libguile/unif.c
	libguile/vm.c
2009-08-28 19:16:46 +02:00
Ludovic Courtès
f86f3b5b11 Remove the `scm_tc_free_cell' SMOB type.
* libguile/deprecated.h (SCM_FREEP, SCM_NFREEP): Changed to constants.

* libguile/gc.c (scm_i_tag_name): Remove reference to
  `scm_tc_free_cell'.

* libguile/gc.h (SCM_FREE_CELL_CDR, SCM_SET_FREE_CELL_CDR): Remove.

* libguile/smob.c (free_print): Remove.
  (scm_smob_prehistory): Don't create the "free" SMOB type.

* libguile/struct.c (struct_finalizer_trampoline): Use a bare
  `scm_tc3_struct' tag for finalized structs instead of
  `scm_tc_free_cell'.

* libguile/tags.h (scm_tc_free_cell): Remove.
2009-08-25 23:57:49 +02:00
Michael Gran
27646f414e Use string and symbol accessors in struct, throw, and array funcs
* libguile/struct.c (scm_make_struct_layout, scm_struct_init)
  (scm_struct_vtable_p, scm_struct_ref, scm_struct_set_x): use string
  and symbol accessors and avoid unpacking strings and symbols

* libguile/throw.c (scm_ithrow): allow wide symbols in the error message

* libguile/unif.c (scm_enclose_array, scm_istr2bve): use string
  accessors and avoid unpacking strings
2009-08-23 09:29:16 -07:00
Ludovic Courtès
fbb857a472 Merge branch 'master' into boehm-demers-weiser-gc
Conflicts:
	lib/Makefile.am
	libguile/Makefile.am
	libguile/frames.c
	libguile/gc-card.c
	libguile/gc-freelist.c
	libguile/gc-mark.c
	libguile/gc-segment.c
	libguile/gc_os_dep.c
	libguile/load.c
	libguile/macros.c
	libguile/objcodes.c
	libguile/programs.c
	libguile/strings.c
	libguile/vm.c
	m4/gnulib-cache.m4
	m4/gnulib-comp.m4
	m4/inline.m4
2009-08-18 00:06:45 +02:00
Neil Jerram
53befeb700 Change Guile license to LGPLv3+
(Not quite finished, the following will be done tomorrow.
   module/srfi/*.scm
   module/rnrs/*.scm
   module/scripts/*.scm
   testsuite/*.scm
   guile-readline/*
)
2009-06-17 00:22:09 +01:00
Ludovic Courtès
083f810fe9 Merge branch 'master' into boehm-demers-weiser-gc
Conflicts:
	lib/Makefile.am
	libguile/struct.c
	libguile/threads.c
	m4/gnulib-cache.m4
	m4/gnulib-comp.m4
2008-12-14 20:48:15 +01:00
Ludovic Courtès
cb823e630d Fix potential deadlock in `make-struct'.
* libguile/struct.c (scm_make_struct): Remove critical section, as
  suggested by Linas Vepstas <linasvepstas@gmail.com>.  See
  http://lists.gnu.org/archive/html/bug-guile/2008-11/msg00036.html for
  a discussion.
2008-11-30 20:26:56 +01:00
Ludovic Courtès
44e268898b Merge branch 'master' into boehm-demers-weiser-gc
Conflicts:
	lib/Makefile.am
	libguile/gc-card.c
	libguile/gc-freelist.c
	libguile/gc-mark.c
	libguile/gc-segment.c
	libguile/gc.c
	libguile/gc.h
	libguile/gc_os_dep.c
	libguile/private-gc.h
	m4/.cvsignore
	m4/gnulib-cache.m4
	m4/gnulib-comp.m4
2008-09-13 22:51:27 +02:00
Ludovic Courtès
dbb605f575 Include <config.h> in all C files; use #ifdef HAVE_CONFIG_H' rather than #if'. 2008-09-13 15:35:27 +02:00
Ludovic Courtès
6f03035fe8 Merge branch 'master' into boehm-demers-weiser-gc
Conflicts:
	libguile/Makefile.am
	libguile/coop-defs.h
	libguile/gc-card.c
	libguile/gc-freelist.c
	libguile/gc-malloc.c
	libguile/gc-mark.c
	libguile/gc-segment.c
	libguile/gc.c
	libguile/gc.h
	libguile/gc_os_dep.c
	libguile/hashtab.c
	libguile/hashtab.h
	libguile/inline.h
	libguile/private-gc.h
	libguile/struct.c
	libguile/struct.h
	libguile/threads.c
	libguile/threads.h
	libguile/vectors.h
	libguile/weaks.h
	test-suite/tests/gc.test
2008-09-10 23:09:30 +02:00
Ludovic Courtès
e9b8556ec9 Merge commit '7337d56d57' into boehm-demers-weiser-gc
Conflicts:
	libguile/struct.c
2008-09-10 22:44:31 +02:00
Ludovic Courtès
4a4849dbe0 Merge commit '0329137392' into boehm-demers-weiser-gc
Conflicts:
	libguile/gc.c
	libguile/srcprop.c
	libguile/srcprop.h
2008-09-10 22:33:40 +02:00
Ludovic Courtes
e7bca22779 Use thread-local allocation (significant perf. improvement!); added the `boehm-gc.h' header.
* libguile/Makefile.am (modinclude_HEADERS): Added `boehm-gc.h'.

* libguile/coop-defs.h: Use "libguile/boehm-gc.h" instead of <gc/gc.h>.

* libguile/coop-threads.h: Likewise.

* libguile/coop.c: Likewise.

* libguile/gc.c: Likewise.
  (scm_storage_prehistory): Invoke `GC_init ()'.

* libguile/guardians.c: Use "libguile/boehm-gc.h" instead of <gc/gc.h>.

* libguile/inline.h: Likewise.
  (scm_double_cell): Use `GC_MALLOC' instead of `GC_malloc'.

* libguile/pthread-threads.h: Use "libguile/boehm-gc.h" instead of
  <gc/gc.h>.

* libguile/smob.c: Likewise.

* libguile/smob.h: Likewise.

* libguile/struct.c: Likewise.

* libguile/threads.c: Likewise.

* libguile/weaks.c: Likewise.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-51
2008-09-10 22:19:49 +02:00
Ludovic Courtes
184327a68d Turn "all interior pointers" off (slight performance gain).
* libguile/gc.c (scm_storage_prehistory): Set `GC_all_interior_pointers'
  to 0.  Register `scm_tc3_cons' and `scm_tc3_closure' as valid
  displacements.

* libguile/struct.c (scm_alloc_struct): Register additional
  displacements.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-48
2008-09-10 22:19:11 +02:00
Ludovic Courtes
6cc80cb6ab Removed the now-useless `scm_struct_free_*' functions.
* libguile/struct.c (scm_alloc_struct): Set the `scm_struct_i_free'
  element to 0 instead of `scm_struct_free_standard'.
  (scm_struct_free_0): Removed.
  (scm_struct_free_light): Removed.
  (scm_struct_free_standard): Removed.
  (scm_struct_free_entity): Removed.

* libguile/struct.h (scm_struct_free_0): Removed.
  (scm_struct_free_light): Removed.
  (scm_struct_free_standard): Removed.
  (scm_struct_free_entity): Removed.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-35
2008-09-10 20:26:47 +02:00
Ludovic Courtes
5e67dc27e3 Added support for the free function of structures.
* libguile/struct.c (struct_finalizer_trampoline): New.
  (scm_struct_gc_init): Removed.
  (scm_i_structs_to_free): Removed.
  (scm_free_structs): Removed.
  (scm_make_struct): Register a finalizer for the new struct if need be.
  (scm_struct_prehistory): Cleared.

* libguile/struct.h (scm_i_structs_to_free): Removed.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-33
2008-09-05 09:37:17 +02:00
Ludovic Courtes
26224b3f5d Merge from lcourtes@laas.fr--2005-mobile
Patches applied:

 * lcourtes@laas.fr--2005-mobile/guile-core--boehm-gc--1.9  (base, patch 1)

   - tag of lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--base-0
   - Initial hack for Boehm's GC support: nothing works.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-1
2008-09-05 00:45:58 +02:00
Han-Wen Nienhuys
569aa529d5 Use word_2 to store mark bits for freeing structs and vtables in the
correct order.

This ensures that we only use GC Marks during the actual GC Mark.
2008-08-16 13:21:21 -03:00
Andy Wingo
4650d11502 fix struct-ref and struct-set! on "light" structs
* libguile/struct.c (scm_struct_ref, scm_struct_set_x): "Light" structs
have no hidden words (members of the SCM_STRUCT_DATA(x) array accessed
with negative indices). In that case, determine the number of fields
from the length of the struct layout descriptor. (Most GOOPS instances
are light structs.)
2008-04-10 23:21:30 +02:00
Kevin Ryde
651f2cd27d merge from 1.8 branch 2007-03-07 23:12:36 +00:00
Ludovic Courtès
42ddb3cb8b Changes from arch/CVS synchronization 2007-01-19 08:53:33 +00:00
Ludovic Courtès
d15ad007c9 Changes from arch/CVS synchronization 2006-06-13 07:48:42 +00:00
Kevin Ryde
2b829bbb3d merge from 1.8 branch 2006-04-17 00:05:42 +00:00
Marius Vollmer
92205699d0 The FSF has a new address. 2005-05-23 19:57:22 +00:00
Marius Vollmer
4e047c3e46 Include "libguile/async.h" for SCM_CRITICAL_SECTION_START/END. 2005-03-07 21:42:02 +00:00
Marius Vollmer
9de87eea47 See ChangeLog from 2005-03-02. 2005-03-02 20:42:01 +00:00
Marius Vollmer
0345e278f4 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
scm_uintprint to print unsigned integers, raw heap words, and
adresses, using a cast to scm_t_bits to turn pointers into
integers.
2004-10-22 15:13:12 +00:00
Marius Vollmer
d2e53ed6f8 *** empty log message *** 2004-09-22 17:41:37 +00:00
Marius Vollmer
cc95e00ac6 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH.  Updated all
uses.
(scm_i_make_string, scm_c_make_string): New, to replace
scm_allocate_string.  Updated all uses.
(SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
SCM_STRING_LENGTH): Deprecated.
(scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
Discouraged.  Replaced all uses with scm_from_locale_string or
similar, as appropriate.
(scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
scm_substring_shared, scm_substring_copy): New.

* symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
(SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
Deprecated.
(SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
(scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
New, to replace scm_str2symbol and scm_mem2symbol, respectively.
Updated all uses.
(scm_gensym): Generate only the number suffix in the buffer, just
string-append the prefix.
2004-08-19 17:19:44 +00:00
Marius Vollmer
8824ac88f0 * socket.c, rw.c, deprecated.h, validate.h
(SCM_VALIDATE_STRING_COPY): Deprecated.  Replaced all uses with
SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
scm_to_locale_string, etc.
(SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated.  Replaced as
above, plus scm_i_get_substring_spec.

* regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
SCM_STRING_LENGTH, respectively.  Also, replaced scm_return_first
with more explicit scm_remember_upto_here_1, etc, or introduced
them in the first place.
2004-08-12 17:45:03 +00:00
Marius Vollmer
b9bd8526f0 * numbers.h, numbers.c, discouraged.h, discouraged.c (scm_short2num,
scm_ushort2num, scm_int2num, scm_uint2num, scm_long2num,
scm_ulong2num, scm_size2num, scm_ptrdiff2num, scm_num2short,
scm_num2ushort, scm_num2int, scm_num2uint, scm_num2long,
scm_num2ulong, scm_num2size, scm_num2ptrdiff, scm_long_long2num,
scm_ulong_long2num, scm_num2long_long, scm_num2ulong_long):
Discouraged by moving to discouraged.h and discouraged.c and
reimplementing in terms of scm_from_* and scm_to_*.  Changed all uses
to the new scm_from_* and scm_to_* functions.
2004-08-02 16:14:04 +00:00
Marius Vollmer
e11e83f3d9 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
SCM_INUM): Deprecated by reenaming them to SCM_I_INUMP, SCM_I_NINUMP
and SCM_I_INUM, respectively and adding deprecated versions to
deprecated.h and deprecated.c.  Changed all uses to either use the
SCM_I_ variants or scm_is_*, scm_to_*, or scm_from_*, as appropriate.
2004-07-23 15:43:02 +00:00
Marius Vollmer
a55c2b6809 * validate.h, deprecated.h (SCM_VALIDATE_INUM, SCM_VALIDATE_INUM_COPY,
SCM_VALIDATE_BIGINT, SCM_VALIDATE_INUM_MIN,
SCM_VALIDATE_INUM_MIN_COPY,
SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
fixnum/bignum distinction visible.  Changed all uses to scm_to_size_t
or similar.
2004-07-10 14:35:36 +00:00
Marius Vollmer
93ccaef0c6 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
SCM_I_MAKINUM and changed all uses.
2004-07-08 15:58:11 +00:00
Marius Vollmer
7888309be8 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into "deprecated.h".
Replaced all uses with scm_is_false, scm_is_true, scm_from_bool, and
scm_is_bool, respectively.
2004-07-06 10:59:25 +00:00
Marius Vollmer
73be1d9e8e Changed license terms to the plain LGPL thru-out. 2003-04-05 19:15:35 +00:00
Rob Browning
a6f7f57d25 * struct.c: #include <config.h> if HAVE_CONFIG_H. 2003-03-26 00:00:46 +00:00