anchor.diff:    (declare (ignore library convention))
     (multiple-value-bind (types values return-type)
         (foreign-funcall-parse-args args)
  -    (produce-function-pointer-call name types values return-type)))
  -
  -(defmacro %foreign-funcall-pointer (ptr args &key convention)
  +    `(ext:with-backend
  +      :bytecodes
  +      ,(dffi-function-pointer-call name types values return-type)
  +      :c/c++
  +      ,(ecase *cffi-ecl-method*
  +         (:dffi   (dffi-function-pointer-call name types values return-type))
  +         (:dlopen (c-inline-function-call name types types values return-type t nil))
  +         (:c/c++  (c-inline-function-call name types types values return-type nil nil))))))
  +
  +(defmacro %foreign-funcall-pointer (pointer args &key convention)
     "Funcall a pointer to a foreign function."
     (declare (ignore convention))
     (multiple-value-bind (types values return-type)
         (foreign-funcall-parse-args args)
  -    (produce-function-pointer-call ptr types values return-type)))
  +    `(ext:with-backend
  +      :bytecodes
  +      ,(dffi-function-pointer-call pointer types values return-type)
  +      :c/c++
  +      ,(if (eq *cffi-ecl-method* :dffi)
  +           (dffi-function-pointer-call pointer types values return-type)
  +           (c-inline-function-call pointer types types values return-type t nil)))))
  +
  +(defmacro %foreign-funcall-varargs (name args varargs &key library convention)
  +  (declare (ignore library convention))
  +  (multiple-value-bind (fixed-types fixed-values)
  +      (foreign-funcall-parse-args args)
  +    (multiple-value-bind (varargs-types varargs-values return-type)
  +        (foreign-funcall-parse-args varargs)
  +      (let ((all-types (append fixed-types varargs-types))
  +            (values (append fixed-values varargs-values)))
  +       `(ext:with-backend
  +         :bytecodes
  +         ,(dffi-function-pointer-call name all-types values return-type)
  +         :c/c++
  +         ,(ecase *cffi-ecl-method*
  +            (:dffi   (dffi-function-pointer-call name all-types values return-type))
  +            (:dlopen (c-inline-function-call name fixed-types all-types values return-type t t))
  +            (:c/c++  (c-inline-function-call name fixed-types all-types values return-type nil t))))))))
  +
  +(defmacro %foreign-funcall-pointer-varargs (pointer args varargs &key convention)
  +  (declare (ignore convention))
  +  (multiple-value-bind (fixed-types fixed-values)
  +      (foreign-funcall-parse-args args)
  +    (multiple-value-bind (varargs-types varargs-values return-type)
  +        (foreign-funcall-parse-args varargs)
  +      (let ((all-types (append fixed-types varargs-types))
  +            (values (append fixed-values varargs-values)))
  +       `(ext:with-backend
  +         :bytecodes
  +         ,(dffi-function-pointer-call pointer all-types values return-type)
  +         :c/c++
  +         ,(if (eq *cffi-ecl-method* :dffi)
  +            (dffi-function-pointer-call pointer all-types values return-type)
  +            (c-inline-function-call pointer fixed-types all-types values return-type t t)))))))
   
   ;;;# Foreign Libraries
   
  
positive.code:    #:%mem-set
     #:%foreign-funcall
     #:%foreign-funcall-pointer
     #:%foreign-type-alignment
     #:%foreign-type-size
     #:%load-foreign-library
  
negative.code:   #+dffi
    `(si::call-cfun ,pointer ,return-type (list ,@types) (list ,@values)))
  
  (defun foreign-funcall-parse-args (args)
    "Return three values, lists of arg types, values, and result type."
    (let ((return-type :void))
  