Changes between Initial Version and Version 1 of InitUnixSockAddr


Ignore:
Timestamp:
07/07/07 03:36:28 (7 years ago)
Author:
bfulgham
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • InitUnixSockAddr

    v1 v1  
     1= INIT-UNIX-SOCKADDR = 
     2Way 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 
     4In '''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 
     6The 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).