File: ffi-test.cdecl

package info (click to toggle)
mit-scheme 12.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 208,300 kB
  • sloc: lisp: 781,881; xml: 425,435; ansic: 86,059; sh: 10,135; makefile: 2,501; asm: 2,121; csh: 1,143
file content (38 lines) | stat: -rw-r--r-- 672 bytes parent folder | download | duplicates (4)
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
35
36
37
38
;;; -*-Scheme-*-

;;;; Declarations for a test library; used to test the C/Unix FFI.

(typedef TestStruct
  (struct
    (first char)
    (second double)
    (third char)
    (fourth (* char))))

(typedef TestUnion
  (union
    (s TestStruct)
    (d double)))

(extern double test_double
	(d double)
	(s (* TestStruct)))

(extern (* char) test_string
	(c (* char))
	(s (* TestStruct)))

(extern void test_register_double
	(CALLBACK TestDoubleCallback)
	(ID (* void)))
(typedef TestDoubleCallback (* mumble))

(callback double test_double_callback
	  (d double)
	  (ID (* void)))

(extern TestStruct test_struct
	(s TestStruct))

(extern TestUnion test_union
	(u TestUnion))