EXT:GETENV now coerces its input to type SIMPLE-BASE-STRING.

This commit is contained in:
Juan Jose Garcia Ripoll 2011-02-08 23:12:09 +01:00
parent 40146b3fd3
commit 3e2e5f9dc3
2 changed files with 4 additions and 1 deletions

View file

@ -195,6 +195,8 @@ ECL 11.1.2
- ECL will always build, by default, with support for Unicode strings.
- EXT:GETENV coerces its input argument to type BASE-STRING.
;;; Local Variables: ***
;;; mode:text ***
;;; fill-column:79 ***

View file

@ -812,7 +812,8 @@ si_getenv(cl_object var)
{
const char *value;
var = ecl_check_cl_type(@'ext::getenv', var, t_base_string);
/* Strings have to be null terminated base strings */
var = si_copy_to_simple_base_string(var);
value = getenv((char*)var->base_string.self);
@(return ((value == NULL)? Cnil : make_base_string_copy(value)))
}