|
From: Sam S. <sd...@gn...> - 2005-06-23 13:41:47
|
> * Hoehle, Joerg-Cyril <Wbr...@g-...> [2005-06-23 13:22:46 +0200]: > >>1. You did not mark WRITE-MEMORY-AS as ABI in constsym.d. >> It appears to be a part of ABI just like MEMORY-AS is. > To tell the truth, I did not yet understand what .fas file ABI means. > Furthermore, when I built a mental definition of what it could mean > (the names of forms that the compiler may put as calls in a .fas files > and must therefore be present at load time), I found some names that > did not match this definition (sorry, I since forgot which ones). yes, this is it. >>3. Why did you use the internal SYS::DEF-SETF-ALIAS instead of the CL >> DEFSETF? SYS::DEF-SETF-ALIAS is internal to places.lisp. >> foreign1.lisp should use DEFSETF like all the other places do. > Ordering of arguments. > I thought about putting the def-setf-alias in places.lisp but then > decided to keep FFI stuff in foreign1.lisp. right. > (defsetf memory-as write-memory-as) expects the new-value last. > def-setf-alias expects new-value first. That's what I wanted because > it is compatible with &optional &rest etc. I have this in modules/syscalls/posix.lisp: (defsetf priority (pid &optional which) (value) `(set-priority ,value ,pid ,which)) >>4. Please add src/NEWS and doc/impext.xml entries for MEMORY-AS. >> (an example would be handy too...) > Actually, I was yet unsure whether to > o document it as accepting internal-c-types only > o document it as accepting both internal and the symbolic primitive type names, thus making > (memory-as p 'ffi:c-pointer) a valid call, instead of > (memory-as p (parse-c-type 'ffi:c-pointer)) > o document the 'string special case: it's part of a more general thing to dereference strings, supporting all encodings. > CLISP is still missing utilities to that effect such as foreign-string-length etc. > Maybe I'll remove the 'string case again, in favour of a more general utility, e.g. > convert-foreign-to-string -> (values string, bytes) > > I'll document that item when I'll have made up my opinion about this. you may just add a FIXME placeholder to the documentation and a link to it from NEWS. (note that you do not need a ChangeLog entry for a doc change). > src/CodingStyle could be a good place for this. it lists all of this. -- Sam Steingold (http://www.podval.org/~sds) running w2k <http://www.memri.org/> <http://www.iris.org.il> <http://pmw.org.il/> <http://www.honestreporting.com> <http://www.mideasttruth.com/> Profanity is the one language all programmers know best. |