-(defmethod writer-function ((type (eql 'vector)) &rest args)
- (declare (ignore type))
- (destructuring-bind (element-type &optional (length '*)) args
+;; We need these so that we can specify vectors with length given as
+;; a non constant in callbacks
+(define-type-method callback-from-alien-form ((type vector) form)
+ (copy-from-alien-form type form))
+(define-type-method callback-cleanup-form ((type vector) form)
+ (declare (ignore type form))
+ nil)
+
+
+(define-type-method writer-function ((type vector))
+ (destructuring-bind (element-type &optional (length '*))
+ (rest (type-expand-to 'vector type))