mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Added TODO
This commit is contained in:
parent
4006ca560d
commit
a5366007bc
1 changed files with 29 additions and 0 deletions
|
@ -20,5 +20,34 @@
|
|||
;; internal name could be different (Cyc-foreign-code) to facilitate
|
||||
;; library renaming, etc here
|
||||
;(foreign-code STRING ...)
|
||||
|
||||
|
||||
;; TODO: how to handle this?
|
||||
|
||||
;could maybe have a macro (define-c-foreign) that takes below and rewrites it as a define-c
|
||||
;would be nice if we could have foreign-lambda though, which seems much more flexible.
|
||||
;maybe we can work up to that
|
||||
|
||||
;(define strlen
|
||||
; (foreign-lambda int "strlen" char-vector) )
|
||||
|
||||
; (define-syntax define-curl-const
|
||||
; (er-macro-transformer
|
||||
; (lambda (expr rename compare)
|
||||
; (let* ((sym (cadr expr))
|
||||
; (str (symbol->string sym))
|
||||
; (lib_fnc_str (string-append "_" str))
|
||||
; (lib_fnc (string->symbol lib_fnc_str)) ;; Internal library function
|
||||
; (args "(void *data, int argc, closure _, object k)")
|
||||
; (body
|
||||
; (string-append
|
||||
; "return_closcall1(data, k, obj_int2obj(" str "));"))
|
||||
; )
|
||||
; `(begin
|
||||
; (define-c ,lib_fnc ,args ,body)
|
||||
; (define ,sym (,lib_fnc))
|
||||
; )))))
|
||||
|
||||
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue