diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-03-10 11:18:01 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-03-10 11:18:01 -0400 |
commit | 998ec0f6506d8b7065fbe277c253188b38bcac7c (patch) | |
tree | 99e4bdad36025df9b3bd37c782f9dd36f052307a /src/c | |
parent | 36b92359be479b92b5adcbdc669576e61d01f74a (diff) |
React demo
Diffstat (limited to 'src/c')
-rw-r--r-- | src/c/urweb.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c index 823e8824..d42cfaa6 100644 --- a/src/c/urweb.c +++ b/src/c/urweb.c @@ -382,11 +382,9 @@ void uw_write_script(uw_context ctx, uw_Basis_string s) { 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)); |