Recently Written · git

clic

MIRROR ONLY Gopher client with pretty colours in Common Lisp

git clone https://github.com/equwal/clic

Log | Files | Refs


3rdparties/software/cffi_0.21.0/examples/wrapper-example.lisp (877 bytes)

1 (in-package #:cffi-example)
2 
3 (defwrapper* "b0" :long ((x :long)) "return x;")
4 (defwrapper* "b1" :long ((x :long)) "return x;")
5 (defwrapper* "b2" :long ((x :long)) "return x;")
6 (defwrapper* "b3" :long ((x :long)) "return x;")
7 (defwrapper* "b4" :long ((x :long)) "return x;")
8 
9 (define "b0_cffi_wrap(x)"
10   "b0_cffi_wrap(b1_cffi_wrap(b2_cffi_wrap(b3_cffi_wrap(b4_cffi_wrap(+x+x)))))")
11 (define "b1_cffi_wrap(x)"
12   "b0_cffi_wrap(b1_cffi_wrap(b2_cffi_wrap(b3_cffi_wrap(b4_cffi_wrap(+x+x)))))")
13 (define "b2_cffi_wrap(x)"
14   "b0_cffi_wrap(b1_cffi_wrap(b2_cffi_wrap(b3_cffi_wrap(b4_cffi_wrap(+x+x)))))")
15 ;;(define "b3_cffi_wrap(x)"
16 ;;  "b0_cffi_wrap(b1_cffi_wrap(b2_cffi_wrap(b3_cffi_wrap(b4_cffi_wrap(+x+x)))))")
17 ;;(define "b4_cffi_wrap(x)"
18 ;;  "b0_cffi_wrap(b1_cffi_wrap(b2_cffi_wrap(b3_cffi_wrap(b4_cffi_wrap(+x+x)))))")
19 
20 (defwrapper* "bn" :long ((x :long)) "return b0_cffi_wrap(x);")