| | 1 | = INIT-UNIX-SOCKADDR = |
| | 2 | Way back when, it was possible to copy a Lisp string to foreign memory by just {{{BLT}}}ing some number of 8-bit bytes/octets around. That worked fine, because lisp strings were just vectors of octets each of which encoded an 8-bit character code. |
| | 3 | |
| | 4 | In '''OpenMCL''', strings are vectors of 32-bit (well, 21-bit ...) character codes. Therefore, copying each of those octets to foreign memory (via some low-level {{{BLT}}}ing function like {{{CCL::%COPY-IVECTOR-TO-PTR}}}) won't work so well (it'll usually copy about 3 {{{NUL}}} octets per character ...) |
| | 5 | |
| | 6 | The function {{{CCL::INIT-UNIX-SOCKADDR}}} (in {{{ccl:level-1;l1-sockets.lisp}}}) set the socket's "address" (pathname in the case of Unix sockets) to an appropriate native string (rather than the random nonsense with a lot of {{{NUL}}}s in it we would get by naively {{{BLT}}}ing the string contents). |