Mercurial > urweb
diff src/c/urweb.c @ 645:1b571a05874c
React demo
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 10 Mar 2009 11:18:01 -0400 |
parents | aa2290c32ce2 |
children | 5130228d2b29 |
line wrap: on
line diff
--- a/src/c/urweb.c Tue Mar 10 10:49:18 2009 -0400 +++ b/src/c/urweb.c Tue Mar 10 11:18:01 2009 -0400 @@ -382,11 +382,9 @@ ctx->script_front += len; } -char *uw_Basis_get_script(uw_context ctx, uw_unit u) { +const char *uw_Basis_get_script(uw_context ctx, uw_unit u) { if (ctx->script_front == ctx->script) { - char *r = uw_malloc(ctx, 1); - r[0] = 0; - return r; + return ctx->script_header; } else { char *r = uw_malloc(ctx, 41 + (ctx->script_front - ctx->script) + strlen(ctx->script_header));