1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

Fix SCM_DEBUG_TYPING_STRICTNESS bug

* libguile/ports.c (scm_setvbuf): Fix bad use of SCM as a test value.
  Actually all ports have read buffers, so we can remove the condition
  entirely.  Thanks Hydra for building in this way :)
This commit is contained in:
Andy Wingo 2016-06-22 12:50:16 +02:00
parent 0472af4c58
commit 3abd8e1ac1

View file

@ -1,6 +1,5 @@
/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2006,
* 2007, 2008, 2009, 2010, 2011, 2012, 2013,
* 2014, 2015 Free Software Foundation, Inc.
/* Copyright (C) 1995-2001, 2003-2004, 2006-2016
* Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@ -2241,14 +2240,11 @@ SCM_DEFINE (scm_setvbuf, "setvbuf", 2, 1, 0,
pt->read_buf = make_port_buffer (port, read_buf_size);
pt->write_buf = make_port_buffer (port, write_buf_size);
if (saved_read_buf)
scm_unget_bytes (scm_port_buffer_take_pointer (saved_read_buf),
scm_port_buffer_can_take (saved_read_buf),
port);
if (saved_read_buf)
scm_port_buffer_set_has_eof_p (pt->read_buf,
scm_port_buffer_has_eof_p (saved_read_buf));
scm_unget_bytes (scm_port_buffer_take_pointer (saved_read_buf),
scm_port_buffer_can_take (saved_read_buf),
port);
scm_port_buffer_set_has_eof_p (pt->read_buf,
scm_port_buffer_has_eof_p (saved_read_buf));
return SCM_UNSPECIFIED;
}