[cffi-devel] How would I wite the return value for a defcfun in my documentation

Joeish W joeish80829 at yahoo.com
Sun Mar 9 08:46:33 UTC 2014


Here is my defcfun as I normally write it,

;; Size Mat::size() const 
;; Size* cv_Mat_size(Mat* self) 
(defcfun ("cv_Mat_size" mat-size) (:pointer size) 
  (self (:pointer mat)))


the 


;; Size Mat::size() const 


is the C++  function declaration with a Size return value


The ;; Size* cv_Mat_size(Mat* self) is the  C wrapper function declaration with a Size* return value


This is my defcfun with a (:pointer size) return value

(defcfun ("cv_Mat_size" mat-size) (:pointer size) 
  (self (:pointer mat)))

In my Documentation for this function I list the Common Lisp function declaration as

(MAT-SIZE (SELF (:POINTER MAT))) 


I couldn't figure out if I should add a return value


but in C++ the return value always goes up front i/e ;; Size Mat::size() const 

Is it common to put return values on Lisp/CFFI function declarations and if so where 


in this declaration  (MAT-SIZE (SELF (:POINTER MAT))) should I put mine

btw on the CLHS I didn't see or missed return values on any function declaration

Thanks in advance for any  takers=)

Good Day.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20140309/9b14c439/attachment.html>


More information about the cffi-devel mailing list