[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/01: Fix SCM_DEBUG_TYPING_STRICTNESS bug
From: |
Andy Wingo |
Subject: |
[Guile-commits] 01/01: Fix SCM_DEBUG_TYPING_STRICTNESS bug |
Date: |
Wed, 22 Jun 2016 10:51:26 +0000 (UTC) |
wingo pushed a commit to branch master
in repository guile.
commit 3abd8e1ac1608c54439c99241e6c1f2ffafe9bc1
Author: Andy Wingo <address@hidden>
Date: Wed Jun 22 12:50:16 2016 +0200
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 :)
---
libguile/ports.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/libguile/ports.c b/libguile/ports.c
index 858dd01..c214717 100644
--- a/libguile/ports.c
+++ b/libguile/ports.c
@@ -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;
}