1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 22:10:21 +02:00

(scm_putc, scm_puts): Assert that the port argument is a output port.

This commit is contained in:
Marius Vollmer 2005-05-22 16:18:55 +00:00
parent 5a6d139b35
commit 417b0dc1fb

View file

@ -1021,12 +1021,14 @@ scm_getc (SCM port)
void
scm_putc (char c, SCM port)
{
SCM_ASSERT_TYPE (SCM_OPOUTPORTP (port), port, 0, NULL, "output port");
scm_lfwrite (&c, 1, port);
}
void
scm_puts (const char *s, SCM port)
{
SCM_ASSERT_TYPE (SCM_OPOUTPORTP (port), port, 0, NULL, "output port");
scm_lfwrite (s, strlen (s), port);
}