X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fffi.lisp;h=29862a833d57d1d8a2100adfd862fc7abe9997df;hb=fc970a48c4326a2309ad0efd0b1c557fe25c7413;hp=73d95a0895df12fa9f7939f7f8ca12d8476220f6;hpb=84e86dfe99d64c1cb0bec680c9154dd9b2d34ca6;p=jscl.git diff --git a/src/ffi.lisp b/src/ffi.lisp index 73d95a0..29862a8 100644 --- a/src/ffi.lisp +++ b/src/ffi.lisp @@ -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)) @@ -29,10 +26,7 @@ ;; 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))))))