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

port-encoding returns #f if port encoding not set

* libguile/ports.c (scm_port_encoding): Instead of returning "NONE" if
  we don't know the encoding, return #f. Allows truncated-print to work
  if you don't have a locale set.
This commit is contained in:
Andy Wingo 2010-01-09 19:21:09 +01:00
parent 6f16379e9a
commit 0af34a3f83

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2007, 2008, 2009, 2010 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
@ -2042,7 +2042,7 @@ SCM_DEFINE (scm_port_encoding, "port-encoding", 1, 0, 0,
if (enc)
return scm_from_locale_string (pt->encoding);
else
return scm_from_locale_string ("NONE");
return SCM_BOOL_F;
}
#undef FUNC_NAME