orthecreedence/cl-async — pull request #109 by akovalenko (2014-12-21 06:56:58+00:00)
Title: Ensure octet-vector creation for stream-write-byte

`STREAM-WRITE-BYTE` method for `ASYNC-OUTPUT-STREAM` creates a simple vector with `(vector byte)`.

With `*BUFFER-WRITES*` enabled, this sequence is passed down to `WRITE-SOCKET-DATA` and `WRITE-TO-BUFFER`. The latter declares its `SEQ` argument to be an `OCTET-VECTOR`, not a simple vector. The actual parameter type mismatches the declaration.

Let's create an octet-vector in `STREAM-WRITE-BYTE` instead of a simple vector. (That's what my patch does).

(There's also a more general problem with `STREAM-WRITE-SEQUENCE` method that is not really prepared to work with anything but an `OCTET-VECTOR`. If we solve it by throwing in some `TYPECASE`/`COERCE`, *this* patch will become unnecessary, but still useful to avoid one extra array consing per `WRITE-BYTE`).