diff src/cjr_print.sml @ 323:5030e909fbf3

Region memory allocation for query parameters
author Adam Chlipala <adamc@hcoop.net>
date Thu, 11 Sep 2008 12:40:40 -0400
parents aa89b73d83e4
children b91480c9a729
line wrap: on
line diff
--- a/src/cjr_print.sml	Thu Sep 11 12:22:06 2008 -0400
+++ b/src/cjr_print.sml	Thu Sep 11 12:40:40 2008 -0400
@@ -712,7 +712,7 @@
                                                                                               
             val outputs = exps @ tables
         in
-            box [string "({",
+            box [string "(uw_begin_region(ctx), ({",
                  newline,
                  string "PGconn *conn = uw_get_db(ctx);",
                  newline,
@@ -791,6 +791,8 @@
                  newline,
                  newline,
 
+                 string "uw_end_region(ctx);",
+                 newline,
                  string "n = PQntuples(res);",
                  newline,
                  string "for (i = 0; i < n; ++i) {",
@@ -851,7 +853,7 @@
                  newline,
                  string "acc;",
                  newline,
-                 string "})"]
+                 string "}))"]
         end
 
       | EDml {dml, prepared} =>