summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2012-03-16 08:42:51 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2012-03-16 08:42:51 -0400
commita613f7d9361f504290757c686d87f56dc1e7b088 (patch)
tree3c3cb780abb8c262dab321cbadb323a0cfb66957 /src
parente90f7afc607a0af326c87ebb184b7eacfee8b92b (diff)
Change ID generation scheme to conform to HTML standards (thanks to Edward Yang for the catch)
Diffstat (limited to 'src')
-rw-r--r--src/c/urweb.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index dc6ef4e6..b105d5ff 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -3962,7 +3962,14 @@ void uw_cutErrorLocation(char *s) {
}
uw_Basis_string uw_Basis_fresh(uw_context ctx) {
- return uw_Basis_htmlifyInt(ctx, ctx->nextId++);
+ int len;
+ char *r;
+
+ uw_check_heap(ctx, 2+INTS_MAX);
+ r = ctx->heap.front;
+ sprintf(r, "uw%u%n", ctx->nextId++, &len);
+ ctx->heap.front += len+1;
+ return r;
}
uw_Basis_float uw_Basis_floatFromInt(uw_context ctx, uw_Basis_int n) {