Mercurial > urweb
comparison tests/test.c @ 771:eac1974924bb
FFI transactionals
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 02 May 2009 18:41:21 -0400 |
parents | df09c95085f8 |
children |
comparison
equal
deleted
inserted
replaced
770:c125df6fabfc | 771:eac1974924bb |
---|---|
23 | 23 |
24 uw_Basis_unit uw_Test_foo(uw_context ctx) { | 24 uw_Basis_unit uw_Test_foo(uw_context ctx) { |
25 printf("FOO!\n"); | 25 printf("FOO!\n"); |
26 return uw_unit_v; | 26 return uw_unit_v; |
27 } | 27 } |
28 | |
29 static void commit(void *data) { | |
30 printf("Commit: %s\n", data); | |
31 } | |
32 static void rollback(void *data) { | |
33 printf("Rollback: %s\n", data); | |
34 } | |
35 static void free(void *data) { | |
36 printf("Free: %s\n", data); | |
37 } | |
38 | |
39 uw_Basis_unit uw_Test_transactional(uw_context ctx) { | |
40 uw_register_transactional(ctx, "Beppo", commit, rollback, free); | |
41 return uw_unit_v; | |
42 } |