as it is now when I run the below defun "get1":
Code: Select all
(defun get1 (&rest args)
(cond ((symbolp (first args))
(apply #'cl:get args))
((typep (first args) 'cv-video-capture)
(princ 1))))
Code: Select all
(defun make-person (first-name last-name)
(let ((person (gensym "PERSON")))
(setf (get person 'first-name) first-name)
(setf (get person 'last-name) last-name)
person))
I get the following errors:
; in: DEFUN MAKE-PERSON
; (SETF (LISP-CV:GET LISP-CV::PERSON 'LISP-CV::FIRST-NAME) LISP-CV::FIRST-NAME)
; --> LET* MULTIPLE-VALUE-BIND LET FUNCALL
; ==>
; (SB-C::%FUNCALL #'(SETF LISP-CV:GET) #:NEW0 #:PERSON1 'LISP-CV::FIRST-NAME)
;
; caught STYLE-WARNING:
; undefined function: (SETF GET)
;
; compilation unit finished
; Undefined function:
; (SETF GET)
; caught 1 STYLE-WARNING condition
STYLE-WARNING: redefining LISP-CV::MAKE-PERSON in DEFUN
any help on this is much much appreciated:)
CV_VIDEO-CAPTURE Types:
Code: Select all
(define-foreign-type video-capture ()
((garbage-collect :reader garbage-collect :initform nil :initarg
:garbage-collect))
(:actual-type :pointer)
(:simple-parser video-capture))
(defclass cv-video-capture ()
((c-pointer :reader c-pointer :initarg :c-pointer)))
(defmethod translate-to-foreign ((lisp-value cv-video-capture) (c-type video-capture))
(values (c-pointer lisp-value) lisp-value))
(defmethod translate-from-foreign (c-pointer (c-type video-capture))
(let ((video-capture (make-instance 'cv-video-capture :c-pointer c-pointer)))
(when (garbage-collect c-type)
(tg:finalize video-capture (lambda () (del-video-capture c-pointer))))
video-capture))