Introduce ecl_cmp_symbol_value and ecl_cmp_setq which do the minimal
amount of work needed to implement symbol-value and setq for dynamic
variables which we have checked to be non-null and of type symbol in
the compiler.
Also introduce a type check in ecl_symbol_value to be consistent with
ecl_setq which also checks the type. These two functions are mainly
used for the embedding interface now, so for that reason it is also
useful to have a type check in there.
If a directory component followed :wild-inferior for paths
like **/some-dir/some-file, we were not finding all possible matches.
This came about because if we did not match in dir_recursive, we were
returning nil instead of the list of previously found matches.
Fixes#712.
ecl_assqlp is sufficient and does not require argument parsing at runtime. host
is always checked to be a string, so the ecl_assoc test EQUAL will have the same
effect as the previously checked STRING-EQUAL.
On Unix, pathnames are converted into the default encoding specified
by ext:*default-external-format* and back. On Windows, the operating
system already gives us utf16 encoded pathnames, so we use those.
ecl_namestring with ECL_NAMESTRING_FORCE_BASE_STRING encodes with the
specified encoding. Decoding is handled individually in the filesystem
functions.
Includes a minor refactor of list_directory, changing the
PARSE_DIRECTORY_ENTRY macro into an inline function.
Closes#609, #549.
__attribute__((unused)) suppresses unused variable warnings for
the_env in dpp generated code.
:case keyword argument in translate-pathname is unused and not
required by the ANSI spec.
espace_flag in sharp_colon_reader is unused and not necessary for the
current implementation.
ihs_function_name is unused and duplicated as ihs-fname in lsp/top.lsp
Removes coercion to base-string and improves some use cases. Due to
recent change in double-quote reader (conformity fix), now type of
each read string is (simple-array character (*)), so when pathnames
were created, it were copying it to (simple-array base-char (*)), lead
to buggy results. Consider:
(let ((path
(let ((x "foo"))
(make-pathname :name x :type x))))
(eql (pathname-name path)
(pathname-type path))) ; => T
Before change, this construct was returning NIL, what in case of
serialization might be a problem, and wasn't `the right thing`® to do.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>