summaryrefslogtreecommitdiff
path: root/libguile/smob.h
Commit message (Expand)AuthorAgeFilesLines
* Add `scm_smob_type_class()'....* libguile/smob.h: * libguile/smob.c (scm_smob_type_class): New function, to access the GOOPS class for a SMOB type. Andy Wingo2015-02-101-1/+3
* Merge branch 'stable-2.0'...Conflicts: benchmark-suite/benchmarks/ports.bm libguile/async.h libguile/bytevectors.c libguile/foreign.c libguile/gsubr.c libguile/srfi-1.c libguile/vm-engine.h libguile/vm-i-scheme.c module/Makefile.am module/language/tree-il/analyze.scm module/language/tree-il/peval.scm module/scripts/compile.scm module/scripts/disassemble.scm test-suite/tests/asm-to-bytecode.test test-suite/tests/peval.test test-suite/tests/rdelim.test Mark H Weaver2014-09-301-5/+5
|\
| * Fix SCM_SMOB_OBJECT{_,_0_,_1_,_2_,_3_}LOC....Fixes <http://bugs.gnu.org/18495>. * libguile/smob.h (SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_0_LOC) (SCM_SMOB_OBJECT_1_LOC, SCM_SMOB_OBJECT_2_LOC) (SCM_SMOB_OBJECT_3_LOC): These elementary API macros have been broken by commit 56164dc47f6616b359f0ad23be208f01a77b55fa in 2009. Signed-off-by: David Kastrup <dak@gnu.org> David Kastrup2014-09-201-5/+5
| * Avoid use of `GC_PTR' in "smob.h"....Commit c46fee438cf9f4a3449e8d04e7a54805517fd092 removed the "bdw-gc.h" include from "smob.h", so better avoid `GC_PTR'. * libguile/smob.c (scm_i_finalize_smob): Use `void *' instead of `GC_PTR'. * libguile/smob.h (scm_i_finalize_smob): Update declaration accordingly. Ludovic Courtès2012-04-121-1/+1
| * make applicable smob calls cheaper, and fix a memory leak...* libguile/vm.c (prepare_smob_call): New helper. Now, instead of making a per-smob trampoline, we will shuffle the smob into the args and use a gsubr. This prevents a memory leak in which the trampolines, which were values in a weak-key table, were preventing the smobs from being collected. * libguile/vm-i-system.c (call, tail-call, mv-call): Adapt to new smob application mechanism. (smob-call): Remove this instruction. * libguile/smob.h (scm_smob_descriptor): Rename apply_trampoline_objcode to apply_trampoline. * libguile/smob.c: Remove our own objcode trampolines in favor of using scm_c_make_gsubr. (scm_smob_prehistory): No more trampoline weak map. * libguile/procprop.c (scm_i_procedure_arity): Adapt to applicable smob representation change. Andy Wingo2012-03-181-2/+1
| * scm_new_smob, scm_new_double_smob inline functions...* libguile/smob.h (scm_new_smob, scm_new_double_smob): New constructors, which do what SCM_NEWSMOB / SCM_NEWSMOB3 had done, but with inline functions instead of macros. They also bail to scm_i_new_smob / scm_i_new_double_smob in either the mark or the free case, so that the inline definition doesn't reference other internal details like libgc stuff. (SCM_SMOB_TYPE_MASK et al): Move definitions up so the new_smob see them as already being declared. (SCM_NEWSMOB, SCM_RETURN_NEWSMOB, SCM_NEWSMOB2, SCM_RETURN_NEWSMOB2): (SCM_NEWSMOB3, SCM_RETURN_NEWSMOB3): Reimplement in terms of the new inline functions. Remove now-unneeded bdw-gc include. * libguile/smob.c (finalize_smob): Rename from scm_i_finalize_smob, and make static. (scm_i_new_smob, scm_i_new_double_smob): Slow-path allocators. (scm_i_finalize_smob, scm_i_new_smob_with_mark_proc): Add back-compatibility shims to preserve ABI. * libguile/inline.c: Include smob.h, so as to reify scm_new_smob and scm_new_double_smob. Andy Wingo2012-03-081-90/+80
* | make applicable smob calls cheaper, and fix a memory leak...* libguile/vm.c (prepare_smob_call): New helper. Now, instead of making a per-smob trampoline, we will shuffle the smob into the args and use a gsubr. This prevents a memory leak in which the trampolines, which were values in a weak-key table, were preventing the smobs from being collected. * libguile/vm-i-system.c (call, tail-call, mv-call): Adapt to new smob application mechanism. (smob-call): Remove this instruction. * libguile/smob.h (scm_smob_descriptor): Rename apply_trampoline_objcode to apply_trampoline. * libguile/smob.c: Remove our own objcode trampolines in favor of using scm_c_make_gsubr. (scm_smob_prehistory): No more trampoline weak map. * libguile/procprop.c (scm_i_procedure_arity): Adapt to applicable smob representation change. Andy Wingo2012-03-181-4/+2
* | refactor tc7 and tc16 checks...* libguile/tags.h (SCM_HAS_TYP7, SCM_HAS_TYP7S, SCM_HAS_TYP16): New macros. * libguile/bytevectors.h (SCM_BYTEVECTOR_P): * libguile/control.h (SCM_PROMPT_P): * libguile/filesys.h (SCM_DIRP): * libguile/fluids.h (SCM_WITH_FLUIDS_P, SCM_FLUID_P) (SCM_I_DYNAMIC_STATE_P): * libguile/foreign.h (SCM_POINTER_P): * libguile/fports.h (SCM_FPORTP): * libguile/frames.h (SCM_VM_FRAME_P): * libguile/hashtab.h (SCM_HASHTABLE_P): * libguile/inline.h (scm_get_byte_or_eof): * libguile/numbers.h (SCM_REALP, SCM_BIGP, SCM_COMPLEXP, SCM_FRACTIONP): * libguile/objcodes.h (SCM_OBJCODE_P): * libguile/ports.h (SCM_OUTPUT_PORT_P): * libguile/programs.h (SCM_PROGRAM_P): * libguile/smob.h (SCM_SMOB_PREDICATE): * libguile/srfi-14.h (SCM_CHARSETP): * libguile/strings.c (IS_STRING): * libguile/strports.h (SCM_STRPORTP): * libguile/symbols.h (scm_is_symbol): * libguile/variable.h (SCM_VARIABLEP): * libguile/vectors.h (SCM_I_IS_VECTOR, SCM_I_IS_NONWEAK_VECTOR): * libguile/vm-i-system.c (call, tail-call, mv-call) * libguile/vm.h (SCM_VM_P, SCM_VM_CONT_P): * libguile/weak-set.c (SCM_WEAK_SET_P): * libguile/weak-table.c (SCM_WEAK_TABLE_P): * libguile/weak-vector.h (SCM_I_WVECTP): Use them. Andy Wingo2011-10-241-1/+1
* | scm_new_smob, scm_new_double_smob inline functions...* libguile/smob.h (scm_new_smob, scm_new_double_smob): New constructors, which do what SCM_NEWSMOB / SCM_NEWSMOB3 had done, but with inline functions instead of macros. They also bail to scm_i_new_smob / scm_i_new_double_smob in either the mark or the free case, so that the inline definition doesn't reference other internal details like libgc stuff. (SCM_SMOB_TYPE_MASK et al): Move definitions up so the new_smob see them as already being declared. (SCM_NEWSMOB, SCM_RETURN_NEWSMOB, SCM_NEWSMOB2, SCM_RETURN_NEWSMOB2): (SCM_NEWSMOB3, SCM_RETURN_NEWSMOB3): Reimplement in terms of the new inline functions. (scm_i_finalize_smob): Remove declaration, as it's no longer needed or used. Remove now-unneeded bdw-gc include. * libguile/smob.c (finalize_smob): Rename from scm_i_finalize_smob, and make static. (scm_i_new_smob, scm_i_new_double_smob): Slow-path allocators. * libguile/inline.c: Include smob.h, so as to reify scm_new_smob and scm_new_double_smob. Andy Wingo2011-05-261-89/+71
|/
* Add `scm_t_subr' typedef (fix bug #23681)....* libguile/__scm.h (scm_t_subr): New typedef. * libguile/deprecated.h (scm_make_gsubr, scm_make_gsubr_with_generic, scm_call_catching_errors): Use it. * libguile/gsubr.h (scm_c_make_gsubr, scm_c_define_gsubr, scm_c_define_gsubr_with_generic): Likewise. * libguile/smob.h (scm_smob_descriptor)[apply]: Likewise. (scm_set_smob_apply): Likewise. * libguile/snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Likewise. Ludovic Courtès2011-02-131-3/+4
* smobs are applied with vm trampoline procedures...* libguile/smob.c: Instead of having special evaluator support for applying smobs, we use the same strategy that gsubr uses, that smob application should happen via a trampoline VM procedure, which uses a special opcode (smob-apply). So statically allocate all of the desired trampoline procedures here. (scm_i_smob_apply_trampoline): Unfortunately there's no real place to put the trampoline, so instead use a weak-key hash. It's nasty, but I think the benefits of speeding up procedure calls in the general case are worth it. * libguile/smob.h (scm_smob_descriptor): Remove fields apply_0, apply_1, apply_2, and apply_3; these were never public. Also remove the gsubr_type field. Instead cache the trampoline objcode here. (SCM_SMOB_APPLY_0, SCM_SMOB_APPLY_1, SCM_SMOB_APPLY_2, SCM_SMOB_APPLY_3): Just go through scm_call_0, etc here. * libguile/vm-i-system.c (call, tail-call, mv-call): Simplify. All procedure calls are VM calls now. (smob-call): New instruction, used in smob trampoline procedures. * libguile/vm.c (apply_foreign): Remove. Yay! * libguile/procprop.c (scm_i_procedure_arity): Refactor a bit for the smob changes. Andy Wingo2010-01-091-10/+6
* remove scm_tc7_gsubr...* libguile/tags.h (scm_tc7_gsubr): Return to the pool of unused tc7s, as there are no more gsubrs. Yay :) * libguile/programs.h (SCM_F_PROGRAM_IS_PRIMITIVE): (SCM_PROGRAM_IS_PRIMITIVE): New flag and accessor. * libguile/gsubr.c (create_gsubr): * libguile/snarf.h (SCM_STATIC_PROGRAM): Give subrs a PRIMITIVE flag. * libguile/smob.h: * libguile/smob.c (scm_i_smob_arity): New internal procedure. Uses the old GSUBR type macros, local to the file. * libguile/procprop.c (scm_i_procedure_arity): Call out to scm_i_smob_arity, and remove a gsubr case. * libguile/gc.c (scm_i_tag_name): * libguile/evalext.c (scm_self_evaluating_p): * libguile/goops.c (scm_class_of): * libguile/vm.c (apply_foreign): * libguile/hash.c (scm_hasher): * libguile/debug.c (scm_procedure_name): * libguile/print.c (iprin1): Remove gsubr cases. * libguile/gsubr.h (SCM_PRIMITIVE_P): Fix to work with the new VM program regimen. (SCM_GSUBR_TYPE, SCM_GSUBR_MAKTYPE, SCM_GSUBR_MAX, SCM_GSUBR_REQ) (SCM_GSUBR_OPT, SCM_GSUBR_REST): Remove these macros, that are no longer useful. * libguile/gsubr.c (scm_i_gsubr_apply, scm_i_gsubr_apply_list) (scm_i_gsubr_apply_array): Remove internal gsubr application functions. Andy Wingo2010-01-071-1/+3
* add SCM_SMOB_TYPE_BITS and SCM_SMOB_TYPE_MASK...* libguile/smob.h (SCM_SMOB_TYPE_BITS, SCM_SMOB_TYPE_MASK): New macros, for when you want to identify a SMOB by type and mask. * libguile/arrays.c: * libguile/bitvectors.c: * libguile/srfi-4.c: Use the new macros. Andy Wingo2009-12-081-0/+2
* clean up smob macro implementation...* libguile/smob.h: Regularize the SCM_SMOB macros, and make them all go through some generic SMOB accessor macros. * libguile/smob.c (scm_i_set_smob_flags): Remove, as it is unused. Andy Wingo2009-12-081-19/+38
* Remove default port/SMOB finalizers....* libguile/ports.c (scm_port_free0): Remove. (scm_make_port_type): Set `free' to NULL. * libguile/smob.c (scm_make_smob_type): Leave `free' to NULL. (scm_smob_free): Remove. * libguile/smob.h (scm_smob_free): Remove. * libguile/deprecated.c (scm_smob_free): New. * libguile/deprecated.h (scm_smob_free): New declaration. Ludovic Courtès2009-09-281-1/+0
* 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+. Ludovic Courtès2009-09-141-1/+1
* 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 Ludovic Courtès2009-08-181-6/+7
|\
| * 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/* ) Neil Jerram2009-06-171-6/+7
| * Publish the maximum number of SMOB types as `SCM_I_MAX_SMOB_TYPE_COUNT'....* libguile/goops.c (create_smob_classes): Refer to `SCM_I_MAX_SMOB_TYPE_COUNT' rather than 255 (which is wrong) or 256. * libguile/smob.c (MAX_SMOB_COUNT): Alias for `SCM_I_MAX_SMOB_TYPE_COUNT'. * libguile/smob.h (SCM_I_MAX_SMOB_TYPE_COUNT): New macro. Ludovic Courtès2009-02-031-1/+4
* | Publish the maximum number of SMOB types as `SCM_I_MAX_SMOB_TYPE_COUNT'....* libguile/goops.c (create_smob_classes): Refer to `SCM_I_MAX_SMOB_TYPE_COUNT' rather than 255 (which is wrong) or 256. * libguile/smob.c (MAX_SMOB_COUNT): Alias for `SCM_I_MAX_SMOB_TYPE_COUNT'. * libguile/smob.h (SCM_I_MAX_SMOB_TYPE_COUNT): New macro. Ludovic Courtès2009-01-181-1/+4
* | Use thread-local allocation (significant perf. improvement!); added the `boeh......* 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 Ludovic Courtes2008-09-101-1/+1
* | Fixed use of finalizers for guardians and SMOBs (undoes patches 23-24)....* libguile/gc.c (finalizer_trampoline): Removed. (scm_gc_register_finalizer): Removed (undoes patches 23 and 24). * libguile/gc.h (scm_gc_register_finalizer): Removed. * libguile/guardians.c (finalize_guarded): Undid patch 23. Added support for "proxied finalizers". (scm_i_guard): Likewise. * libguile/smob.c (scm_i_finalize_smob): Adapted to `GC_finalization_proc'. * libguile/smob.h: Include <gc/gc.h>. (SCM_NEWSMOB): Use `GC_REGISTER_FINALIZER_NO_ORDER' instead of `scm_gc_register_finalizer ()'. (SCM_NEWSMOB3): Likewise. (scm_i_finalize_smob): Updated. git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-29 Ludovic Courtes2008-09-051-28/+45
* | Added support for SMOBs free function (via finalizers)....* libguile/smob.c (scm_i_finalize_smob): New. * libguile/smob.h (SCM_NEWSMOB): Register `scm_i_finalize_smob ()' as a finalizer for Z if its SMOB type has a free function. (SCM_NEWSMOB3): Likewise. (scm_i_finalize_smob): New declaration. git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-26 Ludovic Courtes2008-09-051-2/+11
* | Added support for SMOB custom mark procedures....* libguile/gc.c (scm_gc_mark): Removed. (scm_gc_mark_dependencies): Removed. (scm_mark_locations): Removed. * libguile/gc.h (scm_gc_mark_dependencies): Removed. (scm_mark_locations): Removed. * libguile/inline.h (scm_cell): Use `GC_MALLOC ()' instead of `GC_malloc ()'. * libguile/smob.c (smob_freelist): New. (smob_gc_kind): New. (smob_mark): New. (scm_gc_mark): New. (scm_i_new_smob_with_mark_proc): New. (scm_smob_prehistory): Initialize `smob_freelist' and `smob_gc_kind'. * libguile/smob.h (scm_i_new_smob_with_mark_proc): New declaration. (SCM_NEWSMOB): Use it if a mark procedure is available. (SCM_NEWSMOB2): Likewise. (SCM_NEWSMOB3): Likewise. * libguile/threads.c (guilify_self_1): Initialize the `current_mark_stack_*' fields. * libguile/threads.h (scm_i_thread)[current_mark_stack_ptr]: New field. [current_mark_stack_limit]: New field. git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-22 Ludovic Courtes2008-09-051-26/+41
|/
* merge from 1.8 branchKevin Ryde2006-04-171-1/+1
* The FSF has a new address.Marius Vollmer2005-05-231-1/+1
* (scm_assert_smob_type): New.Marius Vollmer2004-09-241-1/+4
* * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,...SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS, SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3, SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3, SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC, SCM_SMOB_OBJECT_3_LOC): New. * smob.c (scm_i_set_smob_flags): New function. Marius Vollmer2004-05-061-0/+19
* * smob.h (scm_make_smob_type): Made the declaration match the... definition. Dirk Herrmann2003-10-071-1/+1
* Make type names char const * instead of char *. Thanks to Paul Jarc!Marius Vollmer2003-10-071-1/+1
* Changed license terms to the plain LGPL thru-out.Marius Vollmer2003-04-051-35/+11
* 2002-07-20 Han-Wen <hanwen@cs.uu.nl>...* *.c: add space after commas everywhere. * *.c: use SCM_VECTOR_SET everywhere, where a vector is written. Document cases where SCM_WRITABLE_VELTS() is used. * vectors.h (SCM_VELTS): prepare for write barrier, and let SCM_VELTS() return a const pointer (SCM_VECTOR_SET): add macro. * autogen.sh (mscripts): find and check version number of autoconf. Complain if 2.53 is not found. Han-Wen Nienhuys2002-07-201-3/+3
* Changes in doc/ref:...* api.txt, data-rep.texi: Renamed the struct scm_cell to scm_t_cell. * data-rep.texi: Renamed scm_alloc_cell to scm_cell and scm_alloc_double_cell to scm_double_cell. Changes in libguile: * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL, init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE, SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct scm_cell and all its uses to scm_t_cell in accordance to Guile's naming scheme for types. * alist.c (scm_acons), convert.i.c (CTYPES2UVECT, CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread, scm_spawn_thread), debug.c (scm_make_debugobj), environments.c (scm_make_environment), eval.c (scm_closure), fports.c (scm_fdes_to_port), gc.c (scm_deprecated_newcell, scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell), list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons), ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo), smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport), unif.c (scm_make_uve), variable.c (make_variable), vectors.c (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed scm_alloc_cell to scm_cell. * environments.c (core_environments_observe), gc.c (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object), inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c (FLOAT2NUM), numbers.c (scm_make_real), procs.c (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2, SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable), symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c (allocate_weak_vector): Renamed scm_alloc_double_cell to scm_double_cell. Dirk Herrmann2002-03-011-5/+4
* Replaced SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and...scm_alloc_double_cell, respectively. Marius Vollmer2001-11-251-12/+5
* Prefixed each each exported symbol with SCM_API.Marius Vollmer2001-11-021-20/+20
* * Removed deprecated stuff....* Some more renamings to SCM_<filename>_H. Dirk Herrmann2001-08-311-21/+6
* replace "scm_*_t" with "scm_t_*".Marius Vollmer2001-06-141-7/+7
* revert the ill-considered part of the 2001-05-24 changesMichael Livshin2001-05-261-1/+1
* * validate.h...(SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]): new macros. * unif.h: type renaming: scm_array -> scm_array_t scm_array_dim -> scm_array_dim_t the old names are deprecated, all in-Guile uses changed. * tags.h (scm_ubits_t): new typedef, representing unsigned scm_bits_t. * stacks.h: type renaming: scm_info_frame -> scm_info_frame_t scm_stack -> scm_stack_t the old names are deprecated, all in-Guile uses changed. * srcprop.h: type renaming: scm_srcprops -> scm_srcprops_t scm_srcprops_chunk -> scm_srcprops_chunk_t the old names are deprecated, all in-Guile uses changed. * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c, rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c, strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c, vectors.c, vports.c, weaks.c: various int/size_t -> size_t/scm_bits_t changes. * random.h: type renaming: scm_rstate -> scm_rstate_t scm_rng -> scm_rng_t scm_i_rstate -> scm_i_rstate_t the old names are deprecated, all in-Guile uses changed. * procs.h: type renaming: scm_subr_entry -> scm_subr_entry_t the old name is deprecated, all in-Guile uses changed. * options.h (scm_option_t.val): unsigned long -> scm_bits_t. type renaming: scm_option -> scm_option_t the old name is deprecated, all in-Guile uses changed. * objects.c: various long -> scm_bits_t changes. (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to SCM_I_FIXNUM_BIT. * num2integral.i.c: new file, multiply included by numbers.c, used to "templatize" the various integral <-> num conversion routines. * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl): deprecated. (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig, scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big, scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big, scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num, scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff, scm_num2size): new functions. * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.x * load.c: change int -> size_t in various places (where the variable is used to store a string length). (search-path): call scm_done_free, not scm_done_malloc. * list.c (scm_ilength): return a scm_bits_t, not long. some other {int,long} -> scm_bits_t changes. * hashtab.c: various [u]int -> scm_bits_t changes. scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef). (scm_ihashx): n: uint -> scm_bits_t use scm_bits2num instead of scm_ulong2num. * gsubr.c: various int -> scm_bits_t changes. * gh_data.c (gh_scm2double): no loss of precision any more. * gh.h (gh_str2scm): len: int -> size_t (gh_{get,set}_substr): start: int -> scm_bits_t, len: int -> size_t (gh_<num>2scm): n: int -> scm_bits_t (gh_*vector_length): return scm_[u]size_t, not unsigned long. (gh_length): return scm_bits_t, not unsigned long. * fports.h: type renaming: scm_fport -> scm_fport_t the old name is deprecated, all in-Guile uses changed. * fports.c (fport_fill_input): count: int -> scm_bits_t (fport_flush): init_size, remaining, count: int -> scm_bits_t * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed those prototypes, as the functions they prototype don't exist. * fports.c (default_buffer_size): int -> size_t (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t default_size: int -> size_t (scm_setvbuf): csize: int -> scm_bits_t * fluids.c (n_fluids): int -> scm_bits_t (grow_fluids): old_length, i: int -> scm_bits_t (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int -> scm_bits_t (scm_c_with_fluids): flen, vlen: int -> scm_bits_t * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to the new and shiny SCM_NUM2INT. * extensions.c: extension -> extension_t (and made a typedef). * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so there are no nasty surprises if/when the various deeply magic tag bits move somewhere else. * eval.c: changed the locals used to store results of SCM_IFRAME, scm_ilength and such to be of type scm_bits_t (and not int/long). (iqq): depth, edepth: int -> scm_bits_t (scm_eval_stack): int -> scm_bits_t (SCM_CEVAL): various vars are not scm_bits_t instead of int. (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t i: int -> scm_bits_t * environments.c: changed the many calls to scm_ulong2num to scm_ubits2num. (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t * dynwind.c (scm_dowinds): delta: long -> scm_bits_t * debug.h: type renaming: scm_debug_info -> scm_debug_info_t scm_debug_frame -> scm_debug_frame_t the old names are deprecated, all in-Guile uses changed. (scm_debug_eframe_size): int -> scm_bits_t * debug.c (scm_init_debug): use scm_c_define instead of the deprecated scm_define. * continuations.h: type renaming: scm_contregs -> scm_contregs_t the old name is deprecated, all in-Guile uses changed. (scm_contregs_t.num_stack_items): size_t -> scm_bits_t (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t * continuations.c (scm_make_continuation): change the type of stack_size form long to scm_bits_t. * ports.h: type renaming: scm_port_rw_active -> scm_port_rw_active_t (and made a typedef) scm_port -> scm_port_t scm_ptob_descriptor -> scm_ptob_descriptor_t the old names are deprecated, all in-Guile uses changed. (scm_port_t.entry): int -> scm_bits_t. (scm_port_t.line_number): int -> long. (scm_port_t.putback_buf_size): int -> size_t. * __scm.h (long_long, ulong_long): deprecated (they pollute the global namespace and have little value besides that). (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an SCM handle). (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they exist (for size_t & ptrdiff_t) (scm_sizet): deprecated. * Makefile.am (noinst_HEADERS): add num2integral.i.c Michael Livshin2001-05-241-10/+10
* * Made creation of new smob types thread safe....* Minor cleanups to smob usage. Dirk Herrmann2001-04-211-5/+5
* Remove dump facilities.Keisuke Nishida2001-03-021-10/+0
* New dump/undump scheme.Keisuke Nishida2001-02-051-20/+7
* New files: dump.c, dump.h.Keisuke Nishida2001-02-031-8/+31
* * Return type of scm_make_smob_type is scm_bits_t now.Dirk Herrmann2001-01-151-1/+1
* Smob-related creanup.Keisuke Nishida2000-12-081-2/+1
* Deprecated scm_make_smob_type_mfpe and scm_set_smob_mfpe....Some optimization on applicable smobs. (Thanks to Dirk Herrmann) Keisuke Nishida2000-12-071-17/+12
* Some cleanup on smob calls.Keisuke Nishida2000-12-071-1/+6
* Improved smob calls.Keisuke Nishida2000-12-071-1/+5
* * smob.h (scm_smob_descriptor): Added `apply\' and `gsubr_type\'....* smob.c (scm_make_smob_type): Initialize `apply\' and `gsubr_type\'. (scm_set_smob_apply): New function. (scm_smob_apply_0, scm_smob_apply_1, scm_smob_apply_2, scm_smob_apply_3): New functions. * eval.c (SCM_CEVAL, SCM_APPLY): Added dispatch for applicable smobs. * procs.c (s_scm_procedure_p): Check applicable smobs. Keisuke Nishida2000-08-251-0/+8
* * smob.h: Changed comments for scm_make_smob_type and...scm_make_smob_type_mfpe, warning that the latter might be deprecated in a future release. Mikael Djurfeldt2000-06-201-17/+23