GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Fork of nex3/arc
Description: Paul Graham's Brand New Lisp
Homepage: http://arclanguage.org
Clone URL: git://github.com/KirinDave/arc.git
arc / ffi.scm
100644 34 lines (26 sloc) 0.608 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
(require (lib "foreign.ss"))
(unsafe!)
 
(xdef 'ffi-lib ffi-lib)
(xdef 'get-ffi-obj get-ffi-obj)
 
(xdef 'cbyte _byte)
(xdef 'cshort _short)
(xdef 'cushort _ushort)
(xdef 'cint _int)
(xdef 'cuint _uint)
(xdef 'clong _long)
(xdef 'culong _ulong)
 
(xdef 'cfloat _float)
(xdef 'cdouble _double)
 
(xdef 'cbytes _bytes)
(xdef 'cvec _cvector)
(xdef 'cstring _string)
 
(xdef 'cvoid _void)
(xdef 'cfn _cprocedure)
(xdef 'csizeof ctype-sizeof)
 
(xdef 'cptr _pointer)
(xdef 'cpref ptr-ref)
(xdef 'cpset ptr-set!)
(xdef 'cmalloc malloc)
(xdef 'cfree free)
(xdef 'cfinalize register-finalizer)
(xdef 'gc collect-garbage)