mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-13 15:10:34 +02:00
(scm_putc, scm_puts): Assert that the port argument is a output port.
This commit is contained in:
parent
5a6d139b35
commit
417b0dc1fb
1 changed files with 2 additions and 0 deletions
|
@ -1021,12 +1021,14 @@ scm_getc (SCM port)
|
||||||
void
|
void
|
||||||
scm_putc (char c, SCM port)
|
scm_putc (char c, SCM port)
|
||||||
{
|
{
|
||||||
|
SCM_ASSERT_TYPE (SCM_OPOUTPORTP (port), port, 0, NULL, "output port");
|
||||||
scm_lfwrite (&c, 1, port);
|
scm_lfwrite (&c, 1, port);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
scm_puts (const char *s, SCM port)
|
scm_puts (const char *s, SCM port)
|
||||||
{
|
{
|
||||||
|
SCM_ASSERT_TYPE (SCM_OPOUTPORTP (port), port, 0, NULL, "output port");
|
||||||
scm_lfwrite (s, strlen (s), port);
|
scm_lfwrite (s, strlen (s), port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue