~ chicken-core (chicken-5) /tests/embedded2.scm
Trap1(import chicken.platform chicken.gc chicken.pretty-print)
2
3#>
4#include <assert.h>
5
6int main()
7{
8 static char buffer[ 4096 ];
9
10 void C_toplevel(C_word c, C_word *av);
11
12 CHICKEN_run((void*)C_toplevel);
13 assert(CHICKEN_eval_string_to_string("(oink (make-vector 10 'ok))",
14 buffer, sizeof(buffer)));
15 printf("--> %s\n", buffer);
16 return 0;
17}
18<#
19
20(gc)
21(print "starting...")
22
23(define (oink x)
24 (pp x)
25 (vector-length x))
26
27(return-to-host)