<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div><div class=""><div class="">Hello,</div><div class=""><br class=""></div><div class="">From the CFFI manual, Section 4.9, I understand that </div><div class=""><br class=""></div><div class="">>> "Implementor’s note: size_t is almost always an unsigned int.”</div><div class=""><br class=""></div><div class="">However, this seems to fail on a 64 bit Linux computers, where the C ints are 32 bit</div><div class=""><br class=""></div><div class="">I’ve had better success with </div><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);"><div class="" style="margin: 0px; line-height: normal;"><font face="Menlo" class=""><span class="" style="font-size: 11px;">(cffi:defctype size_t #.(cond ((= 4 (cffi:foreign-type-size :pointer))</span></font></div><div class="" style="margin: 0px; line-height: normal;"><font face="Menlo" class=""><span class="" style="font-size: 11px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> :uint32)</span></font></div><div class="" style="margin: 0px; line-height: normal;"><font face="Menlo" class=""><span class="" style="font-size: 11px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> ((= 8 (cffi:foreign-type-size :pointer))</span></font></div><div class="" style="margin: 0px; line-height: normal;"><font face="Menlo" class=""><span class="" style="font-size: 11px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> :uint64)</span></font></div><div class="" style="margin: 0px; line-height: normal;"><font face="Menlo" class=""><span class="" style="font-size: 11px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> (t (error "Failed type lisp-pointer-type"))))</span></font></div><div class="" style="font-family: Menlo; font-size: 11px;"><br class=""></div><div class="" style="font-family: Menlo; font-size: 11px;"><br class=""></div><div class="">Is this general enough to be trusted everywhere? If so, should it be part of CFFI, or at least </div><div class="">mentioned in the manual? The current text in the manual doesn’t seem to be working for me, and this</div><div class="">is a frequent issue when I port a new foreign library and forget what I did in the past … first thing I do </div><div class="">is (apropos “size-t” :cffi) and (apropos “size_t” :cffi) and nothing shows up.</div><div class=""><br class=""></div><div class="">Best regards,</div><div class="">J.K.</div></div></div></div></body></html>