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

114 commits

Author SHA1 Message Date
Jim Blandy
dc53f02690 Simplify smob and port marking; set the mark bit in the generic
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.
1998-07-23 04:47:56 +00:00
Mikael Djurfeldt
104d453328 * fluids.c: Removed use of assert.h (in order to avoid
__eprintf).

* Makefile.am (libguile_la_LDFLAGS): Added -export-dynamic.

* dynl.c (maybe_drag_in_eprintf): Disabled through #ifdef 0.
1998-05-02 22:26:44 +00:00
Mikael Djurfeldt
c3e09ef939 * dynl.c (scm_must_free_argv): Fixed memory leak due to negated
condition.  (Thanks to John Tobey.)

* dynl.c: Only check that HAVE_DLOPEN is defined before loading
dynl-dl.c; Test on HAVE_LIBDLD instead of HAVE_DLD.
1998-04-19 20:15:49 +00:00
Mikael Djurfeldt
26c41b9956 * dynl.c: Only check that HAVE_DLOPEN is defined before loading
dynl-dl.c; Test on HAVE_LIBDLD instead of HAVE_DLD.

* configure.in: Define HAVE_DLOPEN also when HAVE_LIBDL is
defined.
1998-04-19 00:36:12 +00:00
Tom Tromey
b7f3516f99 * Makefile.in: Rebuilt.
* Makefile.am (libguile_la_SOURCES): Removed extchrs.c,
	mbstrings.c.
	(modinclude_HEADERS): Removed extchrs.h, mbstrings.h.
	* unif.c (scm_vector_set_length_x): Don't handle multibyte
	strings.
	* tag.c (scm_utag_mb_string, scm_utag_mb_substring): Removed.
	(scm_tag): Don't handle multibyte strings.
	* read.c: Don't include mbstrings.h.
	(scm_lreadr): Don't handle multibyte ports.
	* kw.c: Don't include mbstrings.h.
	* init.c: Don't include mbstrings.h.
	(scm_boot_guile_1): Don't init mbstrings module.
	* hash.c (scm_hasher): Don't handle mbstrings.
	* gscm.c (gscm_run_scm): Don't init mbstrings module.
	* gc.c (scm_gc_mark): Don't handle mbstrings.
	(scm_gc_sweep): Likewise.
	* eval.c (SCM_CEVAL): Don't handle mbstrings.
	* eq.c (scm_equal_p): Use SCM_TYP7S, not SCM_TYP7SD.
	* tags.h (SCM_TYP7SD): Removed.
	(SCM_TYP7D): Removed.
	(scm_tc7_mb_string): Removed.
	(scm_tc7_mb_substring): Removed.
	* print.c (scm_iprin1): Handle char printing directly.  Don't
	handle mbstrings.
	Don't include "mbstrings.h".
	* symbols.c (scm_intern_obarray_soft, scm_string_to_symbol,
	scm_string_to_obarray_symbol, msymbolize): Don't set symbol's
	multi-byte flag.
	Don't include "mbstrings.h".
	* symbols.h (SCM_SYMBOL_MULTI_BYTE_STRINGP): Removed.
	(SCM_SYMBOL_SLOTS): Define as 4.
	(SCM_ROSTRINGP): Use SCM_TYP7S, not SCM_TYP7SD.
	* arbiters.c, backtrace.c, debug.c, dynl.c, eval.c, fluids.c,
	gc.c, gsubr.c, ioext.c, kw.c, mallocs.c, numbers.c, ports.c,
	print.c, read.c, regex-posix.c, root.c, srcprop.c, stackchk.c,
	struct.c, threads.c, throw.c, unif.c, variable.c: Use new
	("gen"-less) I/O function names.
	* ports.c (scm_add_to_port_table): Don't set port's
	representation.
	* ports.h (scm_port_representation_type): Removed.
	(scm_string_representation_type): Removed.
	(struct scm_port_table ): Removed representation field.
	(SCM_PORT_REPRESENTATION): Removed.
	(SCM_SET_PORT_REPRESENTATION): Removed.
	* genio.h: Use new function names.
	* genio.c: Don't include "extchrs.h".
	(scm_gen_putc, scm_gen_puts, scm_gen_write, scm_get_getc):
	Removed.
	(scm_putc, scm_puts, scm_lfwrite): No longer static.
	(scm_getc): No longer static; handle line and column changes.
	(scm_ungetc): Renamed from scm_gen_ungetc.
	(scm_do_read_line): Renamed from scm_gen_read_line.
	* libguile.h: Don't include "extchrs.h" or "mbstrings.h"
	* extchrs.h, extchrs.c, mbstrings.h, mbstrings.c: Removed.
1997-10-15 17:18:32 +00:00
Marius Vollmer
5ddca2ef51 Make dynamic linking work on Dec Unix. (Thanks to Clark McGrew)
* dynl.c: Include "dynl-dl.c" also when HAVE_DLOPEN is defined.
1997-10-02 14:40:30 +00:00
Marius Vollmer
c487ad44e7 * dynl.c (free_dynl_obj): New function to free the dynamic object
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.
1997-07-18 14:31:06 +00:00
Jim Blandy
cdbadcacc1 Make things compile neatly under Sun's C compiler.
* 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.
1997-06-21 05:53:39 +00:00
Marius Vollmer
419e9e117f * dynl.c (scm_dynamic_call, scm_dynamic_args_call): Wrap dynamic
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.
1997-06-16 19:09:11 +00:00
Jim Blandy
82892beda5 * Lots of files: New address for FSF. 1997-05-26 22:34:48 +00:00
Marius Vollmer
1fe1799f24 * dynl.c (print_dynl_obj): Indicate whether the dynamic object has
been unlinked.
1997-04-29 18:29:53 +00:00
Marius Vollmer
96599e6aaf * dynl.c: The dynamic linking and module registration functions
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.
1997-01-20 19:11:41 +00:00
Marius Vollmer
80bc78903a * dynl.c (scm_dynamic_func): New function to get the address of a
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.
1997-01-18 11:40:31 +00:00
Marius Vollmer
1edae07624 Initial revision 1996-12-08 16:52:38 +00:00