summaryrefslogtreecommitdiff
path: root/src/proxy.clj
diff options
context:
space:
mode:
Diffstat (limited to 'src/proxy.clj')
-rw-r--r--src/proxy.clj5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/proxy.clj b/src/proxy.clj
index f0463e11..6e3009e8 100644
--- a/src/proxy.clj
+++ b/src/proxy.clj
@@ -45,7 +45,8 @@
ex-type (totype java.lang.UnsupportedOperationException)
gen-method
(fn [#^java.lang.reflect.Method meth else-gen]
- (let [ptypes (to-types (. meth (getParameterTypes)))
+ (let [pclasses (. meth (getParameterTypes))
+ ptypes (to-types pclasses)
rtype (totype (. meth (getReturnType)))
m (new Method (. meth (getName)) rtype ptypes)
gen (new GeneratorAdapter (. Opcodes ACC_PUBLIC) m nil nil cv)
@@ -67,7 +68,7 @@
;box args
(dotimes i (count ptypes)
(. gen (loadArg i))
- (. gen (box (nth ptypes i))))
+ (. clojure.lang.Compiler$HostExpr (emitBoxReturn nil gen (nth pclasses i))))
;call fn
(. gen (invokeInterface ifn-type (new Method "invoke" obj-type
(into-array (cons obj-type