summaryrefslogtreecommitdiff
path: root/src/c/urweb.c
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2010-09-07 09:06:13 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2010-09-07 09:06:13 -0400
commitea36554e005d1be57bede319562061e00c8a63c8 (patch)
tree301967018e16a7c4e7c27b64e5e4b08f288eba7f /src/c/urweb.c
parent2abed5bc95fa69a49d955e0b115d0db874f53a3a (diff)
'tryDml' works with Postgres
Diffstat (limited to 'src/c/urweb.c')
-rw-r--r--src/c/urweb.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index cac518ec..747f62b6 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -2175,6 +2175,15 @@ uw_Basis_string uw_strdup(uw_context ctx, uw_Basis_string s1) {
return s;
}
+uw_Basis_string uw_dup_and_clear_error_message(uw_context ctx) {
+ if (ctx->error_message[0]) {
+ char *s = uw_strdup(ctx, ctx->error_message);
+ ctx->error_message[0] = 0;
+ return s;
+ } else
+ return NULL;
+}
+
uw_Basis_string uw_maybe_strdup(uw_context ctx, uw_Basis_string s1) {
if (s1)
return uw_strdup(ctx, s1);