diff --git a/libguile/strports.c b/libguile/strports.c index 23e986c15..56b02cfe1 100644 --- a/libguile/strports.c +++ b/libguile/strports.c @@ -66,13 +66,6 @@ when rw_active is 0. */ -static int -prinstpt (SCM exp, SCM port, scm_print_state *pstate) -{ - scm_prinport (exp, port, "string"); - return !0; -} - static int stfill_buffer (SCM port) { @@ -358,35 +351,18 @@ scm_eval_string (string) return ans; } +void scm_make_stptob (void); /* Called from ports.c */ - -static int noop0 SCM_P ((SCM stream)); - -static int -noop0 (stream) - SCM stream; +void +scm_make_stptob () { - return 0; + long tc = scm_make_port_type ("string", stfill_buffer, st_flush); + scm_set_ptob_mark (tc, scm_markstream); + scm_set_ptob_flush_input (tc, st_read_flush); + scm_set_ptob_seek (tc, st_seek); + scm_set_ptob_truncate (tc, st_ftruncate); } - -scm_ptobfuns scm_stptob = -{ - scm_markstream, - noop0, - prinstpt, - 0, - st_flush, - st_read_flush, - 0, - stfill_buffer, - st_seek, - st_ftruncate, - 0, -}; - - - void scm_init_strports () { diff --git a/libguile/strports.h b/libguile/strports.h index dfc94034b..d87f8d393 100644 --- a/libguile/strports.h +++ b/libguile/strports.h @@ -46,8 +46,6 @@ #include "libguile/__scm.h" -extern scm_ptobfuns scm_stptob; - extern SCM scm_mkstrport SCM_P ((SCM pos, SCM str, long modes, const char * caller));