Add function for making a varargs cfn factory with serde wrapper
This commit is contained in:
parent
2569b01eea
commit
65848c72eb
1 changed files with 12 additions and 0 deletions
|
|
@ -836,6 +836,18 @@
|
||||||
(make-downcall args ret)
|
(make-downcall args ret)
|
||||||
(make-serde-wrapper args ret)))
|
(make-serde-wrapper args ret)))
|
||||||
|
|
||||||
|
(defn vacfn-factory
|
||||||
|
"Constructs a varargs factory to call the native function referenced by `symbol`.
|
||||||
|
|
||||||
|
The function returned takes any number of type arguments and returns a
|
||||||
|
specialized Clojure function for calling the native function with those
|
||||||
|
arguments."
|
||||||
|
[symbol required-args ret]
|
||||||
|
(-> symbol
|
||||||
|
ensure-address
|
||||||
|
(make-varargs-factory required-args ret)
|
||||||
|
(make-serde-varargs-wrapper required-args ret)))
|
||||||
|
|
||||||
;;; Function types
|
;;; Function types
|
||||||
|
|
||||||
(def ^:private return-for-type
|
(def ^:private return-for-type
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue