Add clarifing comment
[jscl.git] / src / ffi.lisp
index 73d95a0..29862a8 100644 (file)
@@ -16,9 +16,6 @@
 (defvar *js-package*
   (make-package "JS"))
 
-(defun lisp-to-js (x) (%lisp-to-js x))
-(defun js-to-list (x) (%js-to-lisp x))
-
 (defun ffi-intern-hook (symbol)
   (when (eq (symbol-package symbol) *js-package*)
     (let ((sym-name (symbol-name symbol))
       ;; provide a special lambda keyword
       ;; cl::&rest-vector to avoid list argument
       ;; consing, as well as allow inline declarations.
-      (fset symbol
-            (eval `(lambda (&rest ,args)
-                     (let ((,args (list-to-vector (mapcar #'lisp-to-js ,args))))
-                       (js-to-list (%js-call (%js-vref ,sym-name) ,args))))))
+      (fset symbol (eval `(%js-vref ,sym-name)))
       ;; Define it as a symbol macro to access to the
       ;; Javascript variable literally.
       (%define-symbol-macro symbol `(%js-vref ,(string symbol))))))