From 634eee2d60c71d5a50e6bc6c3364d49548f58599 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Thu, 29 Dec 2011 16:08:34 -0500 Subject: Add dynamic content before running its scripts, to get IDs in scope; fix generation of Postgres queries with blobs --- src/postgres.sml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/postgres.sml') diff --git a/src/postgres.sml b/src/postgres.sml index f3b9e3f1..c180e38f 100644 --- a/src/postgres.sml +++ b/src/postgres.sml @@ -680,7 +680,7 @@ fun makeParams inputs = string " };", newline, if List.exists isBlob inputs then - box [string "const int *paramLengths = uw_malloc(ctx, ", + box [string "int *paramLengths = uw_malloc(ctx, ", string (Int.toString (length inputs)), string " * sizeof(int));", newline, @@ -696,7 +696,6 @@ fun makeParams inputs = | _ => string "0", string ";", newline]) inputs, - string " };", newline] else box [string "const int *paramLengths = paramFormats;", -- cgit v1.2.3