diff options
author | 2010-09-07 09:06:13 -0400 | |
---|---|---|
committer | 2010-09-07 09:06:13 -0400 | |
commit | cdd504ea9f9dcf4cfe18756e48319b7a9df296cd (patch) | |
tree | 301967018e16a7c4e7c27b64e5e4b08f288eba7f /src/c | |
parent | 5545969f485ef2fb944db8e7b0237acbabeb8d4c (diff) |
'tryDml' works with Postgres
Diffstat (limited to 'src/c')
-rw-r--r-- | src/c/urweb.c | 9 |
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); |