marking code, and make marker routines only responsible for
turning up outgoing pointers.
* gc.c (scm_gc_mark): Set the mark bit on ports and smobs here,
before calling the marking function. Don't call the marking
function if it's zero.
* markers.c (scm_mark0): Just return #f. This function isn't
necessary at all now, but it's harmless to call it. We'll leave
it in so other folks' code doesn't croak at link time.
(scm_markcdr): Don't call SCM_SETGC8MARK.
* async.c (mark_async): Don't call SCM_SETGC8MARK.
* dynl.c (mark_dynl_obj): Same.
* root.c (mark_root): Same.
* srcprop.c (marksrcprops): Same.
* unif.c (markra): Same.
* variable.c (scm_markvar): Same.
* ports.c (scm_markstream): Same.
(void_port_ptob): Specify zero for our marking function.
* debug.c (debugobjsmob): Same.
* dynwind.c (guardsmob): Same.
* filesys.c (dir_smob): Same.
* fluids.c (fluid_smob): Same.
* fports.c (scm_fptob, scm_pipob): Same.
* mallocs.c (mallocsmob): Same.
* regex-posix.c (regex_t_smob): Same.
* smob.c (freecell, flob, bigob): Same.
* threads.c (thread_smob, mutex_smob, condvar_smob): Same.
* throw.c (jbsmob, lazy_catch_funs): Same.
data. (dynl_smob): Use it.
* dynl.c (scm_dynamic_link): Moved allocating of the memory for
the dynamic object data below the linking of the object to avoid
memory leak when the linking code throws an error. Now the code
leaks a whole dynamically linked library when must_malloc throws,
but that should be much less likely.
* dynl.c (scm_dynamic_func): Cast return value from sysdep_dynl_func.
* extchrs.c (xmbtowc): Make the second arg a normal char, not
unsigned, because that's what the ANSI function takes.
* extchrs.h (xmbtowc): Corresponding change to prototype.
* genio.c (scm_gen_getc): Make buf plain chars. Nobody wants
uchars here.
* mbstrings.c (scm_mb_ilength): Use ANSI arg syntax. Make DATA
argument plain char *.
* strings.c (scm_string): Use SCM_ROCHARS, since c is a plain
char.
* tag.c (scm_tag): Remove unreachable statement.
* unif.c (scm_array_to_list): If we want to shift a 1 bit to the
top of the word, it should be unsigned.
function call in SCM_DEFER_INTS/SCM_ALLOW_INTS.
(scm_dynamic_link, scm_dynamic_unlink, scm_dynamic_func): Always
call the sysdep functions with deferred ints.
* dynl.c, dynl-dl.c, dynl-dld.c, dynl-shl.c (sysdep_dynl_link,
sysdep_dynl_unlink, sysdep_dynl_func): Expect to be called with
deferred interrupts and insert SCM_ALLOW_INTS before throwing an
error.
* dynl.c (scm_dynamic_unlink, scm_dynamic_call): Return
SCM_UNSPECIFIED.
are now defined even when dynamic linking is not available for the
host system. Some of their functionality can be done without
dynamic linking; when it's really needed, they throw errors.
function in a dynamic object.
(scm_dynamic_call, scm_dynamic_args_call): Accept the values
produced by scm_dynamic_func as the thing to call.
* dynl.c, dynl-dl.c, dynl-dld.c, dynl-shl.c: Restructured.
(scm_register_module_xxx, scm_registered_modules,
scm_clear_registered_modules): New functions.