Here is the function im wrapping a c wrapper for a c++ opencv function and below it my wrapper
bool cv_VideoCapture_isOpened0(VideoCapture* self) { return self->isOpened(); }
(cffi:defcfun ("cv_VideoCapture_isOpened0" %vid-cap-cam-is-open) :pointer (self (:pointer video-capture)))
not sure how to call the bool return type, the below defun didnt work using pointer for return type or int on defcfun and casting from boolean inside the defun below with (convert-from-foreign ,var :boolean). when i used a pointer return type, as swig wraps it i mem-refed or mem-arefed the defcun as :int in my defun below
(defun video-cap-cam-is-open (self) (convert-from-foreign (%video-cap-cam-is-open self) :boolean))
in c++ the cout output of the functions im wrapping are 1 for the first one and 0 for the one after cap.release(); is called
cout << "a =" << cap.isOpened(); = 1 cap.release(); cout << "b = " << cap.isOpened(); = 0
function documentation for function im wrapping is here
http://docs.opencv.org/modules/highgui/doc/reading_and_writing_images_and_vi...)