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:
parent
5a6d139b35
commit
417b0dc1fb
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue