Re: Coercing pointers
Edi Weitz <[email protected]> 14 Aug 2003 20:23:40 +0200
| Newsgroups | gmane.lisp.uffi.general |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 14 Aug 2003 12:08:53 -0600, Kevin Rosenberg <kevin-HJRc7zDS/[email protected]> wrote: > I suppose their justification is their is no concept of an unsigned > character in lisp. Hehe, OK. > Hmm, what's so bad about > #+lispworks > (defmacro ensure-char-character (obj) > `(if (characterp ,obj) ,obj (code-char ,obj))) > > Just the run-time overhead? I think that I'm happy enough with this > on Lispworks as I don't know of a better way to regularize their > difference of dereferencing a :char and :unsigned-char. That's fine with me. I usually value correctness and convenience over speed. If you really want to optimize the hell out of your FFI stuff you probably won't use a cross-platform toolkit like UFFI. > We can still add the deref-char-pointer to provide an optimized > dereferencing returning a lisp character. Yes, that would be good to have as an option. Cheers, Edi.