changeset 1118:87b0a9d08e73

uw_close()
author Adam Chlipala <adamc@hcoop.net>
date Tue, 05 Jan 2010 14:57:35 -0500
parents 31ef567fa772
children 951fced704d6
files include/urweb.h src/c/urweb.c
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/include/urweb.h	Tue Jan 05 13:30:27 2010 -0500
+++ b/include/urweb.h	Tue Jan 05 14:57:35 2010 -0500
@@ -21,6 +21,7 @@
 failure_kind uw_initialize(uw_context);
 
 uw_context uw_init(void);
+void uw_close(uw_context);
 int uw_set_app(uw_context, uw_app*);
 void uw_set_db(uw_context, void*);
 void *uw_get_db(uw_context);
--- a/src/c/urweb.c	Tue Jan 05 13:30:27 2010 -0500
+++ b/src/c/urweb.c	Tue Jan 05 14:57:35 2010 -0500
@@ -578,6 +578,10 @@
   return r;
 }
 
+void uw_close(uw_context ctx) {
+  ctx->app->db_close(ctx);
+}
+
 void uw_set_headers(uw_context ctx, char *(*get_header)(void *, const char *), void *get_header_data) {
   ctx->get_header = get_header;
   ctx->get_header_data = get_header_data;