diff tests/transactional.c @ 1327:1cc67fdac4d3

New argument to transactional free functions, to specify whether we are about to retry
author Adam Chlipala <adam@chlipala.net>
date Sat, 04 Dec 2010 11:15:20 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/transactional.c	Sat Dec 04 11:15:20 2010 -0500
@@ -0,0 +1,12 @@
+#include <stdio.h>
+
+#include "/usr/local/include/urweb/urweb.h"
+
+static void do_free(void *data, int will_retry) {
+  printf("will_retry = %d\n", will_retry);
+}
+
+uw_unit uw_Transactional_foo(uw_context ctx) {
+  printf("Registering....\n");
+  uw_register_transactional(ctx, NULL, NULL, NULL, do_free);
+}