fix: si:open-unix-socket-stream accepts both string and base-string

(automatic coercion is performed)
This commit is contained in:
Daniel Kochmański 2016-01-28 11:47:48 +01:00
parent df9a4f33b8
commit e20576df32
3 changed files with 7 additions and 2 deletions

View file

@ -90,6 +90,9 @@
** Issues fixed:
- si:open-unix-socket-stream accepts both string and base-string
(automatic coercion is performed)
- Long form of DEFSETF accepts multiple-values as a store forms:
(defsetf gah (x) (y z) `(list ,x ,y ,z))

View file

@ -339,9 +339,11 @@ si_open_unix_socket_stream(cl_object path)
int fd; /* file descriptor */
struct sockaddr_un addr;
if (ecl_unlikely(ecl_t_of(path) != t_base_string))
if (ecl_unlikely(!ECL_STRINGP(path)))
FEwrong_type_nth_arg(@[si::open-unix-socket-stream], 1, path,
@[string]);
path = si_coerce_to_base_string(path);
if (path->base_string.fillp > UNIX_MAX_PATH-1)
FEerror("~S is a too long file name.", 1, path);

View file

@ -1137,7 +1137,7 @@
#+wants-sockets
(proclamation si:open-server-stream (unsigned-byte) stream)
#+wants-sockets
(proclamation si:open-unix-socket-stream (base-string) stream)
(proclamation si:open-unix-socket-stream (string) stream)
#+wants-sockets
(proclamation si:lookup-host-entry (t) (values (or null string) list list))
(proclamation si:copy-stream (stream stream) t)