From 5bec72c1ee13e48a9e11c3c1b924020436c827fe Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sat, 2 May 2009 18:41:21 -0400 Subject: FFI transactionals --- tests/test.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/test.c') diff --git a/tests/test.c b/tests/test.c index 1249721e..ef8558d7 100644 --- a/tests/test.c +++ b/tests/test.c @@ -25,3 +25,18 @@ uw_Basis_unit uw_Test_foo(uw_context ctx) { printf("FOO!\n"); return uw_unit_v; } + +static void commit(void *data) { + printf("Commit: %s\n", data); +} +static void rollback(void *data) { + printf("Rollback: %s\n", data); +} +static void free(void *data) { + printf("Free: %s\n", data); +} + +uw_Basis_unit uw_Test_transactional(uw_context ctx) { + uw_register_transactional(ctx, "Beppo", commit, rollback, free); + return uw_unit_v; +} -- cgit v1.2.3