mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-30 06:50:31 +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:
parent
6f16379e9a
commit
0af34a3f83
1 changed files with 2 additions and 2 deletions
|
@ -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
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public License
|
* 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)
|
if (enc)
|
||||||
return scm_from_locale_string (pt->encoding);
|
return scm_from_locale_string (pt->encoding);
|
||||||
else
|
else
|
||||||
return scm_from_locale_string ("NONE");
|
return SCM_BOOL_F;
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue