Mercurial > urweb
comparison src/c/urweb.c @ 2085:fd6d362666c0
Optimizing writes of single characters
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Thu, 04 Dec 2014 19:54:04 -0500 |
parents | 1839df6ed755 |
children | 7755f00a4fc3 5709482a2afd |
comparison
equal
deleted
inserted
replaced
2084:0d48cfb59b29 | 2085:fd6d362666c0 |
---|---|
1655 } | 1655 } |
1656 | 1656 |
1657 void uw_writec(uw_context ctx, char c) { | 1657 void uw_writec(uw_context ctx, char c) { |
1658 uw_check(ctx, 2); | 1658 uw_check(ctx, 2); |
1659 uw_writec_unsafe(ctx, c); | 1659 uw_writec_unsafe(ctx, c); |
1660 } | |
1661 | |
1662 void uw_Basis_writec(uw_context ctx, char c) { | |
1663 uw_writec(ctx, c); | |
1660 } | 1664 } |
1661 | 1665 |
1662 static void uw_write_unsafe(uw_context ctx, const char* s) { | 1666 static void uw_write_unsafe(uw_context ctx, const char* s) { |
1663 int len = strlen(s); | 1667 int len = strlen(s); |
1664 memcpy(ctx->page.front, s, len); | 1668 memcpy(ctx->page.front, s, len); |