mirror of
https://github.com/janet-lang/janet
synced 2025-11-08 03:23:01 +00:00
Fix ffi/defbind for non-lazy bindings.
Add testing to bind to symbols in current binary.
This commit is contained in:
@@ -3670,7 +3670,7 @@
|
||||
(defn make-sig []
|
||||
(ffi/signature :default ret-type ;computed-type-args))
|
||||
(defn make-ptr []
|
||||
(assert (ffi/lookup (llib) raw-symbol) "failed to find symbol"))
|
||||
(assert (ffi/lookup (if lazy (llib) lib) raw-symbol) "failed to find symbol"))
|
||||
(if lazy
|
||||
~(defn ,name ,;meta [,;formal-args]
|
||||
(,ffi/call (,(delay (make-ptr))) (,(delay (make-sig))) ,;formal-args))
|
||||
|
||||
Reference in New Issue
Block a user