Commit Graph

4 Commits

Author SHA1 Message Date
Jim Teeuwen
10c722dc95 Fixes bug in StringWriter, which causes the compiler to
generate a segfault when there are too many string
concatenations. This happens when we convert a file of
about 100kb or larger.

The fix modifies the StringWriter to write the file data
out into a single, long string, without concatenations.

This addresses issue #5
2013-07-07 13:02:07 +02:00
jimt
b6af78b318 Merges translation functions into translate.go.
Runs gofmt on code.
2013-03-09 13:31:48 +01:00
Joseph Hager
93063b64a3 Fix Writers returning n-1 bytes written.
ByteWriter and StringWriter were returning n-1 bytes written which was
causing io.Copy to error out with a ShortWrite. This would cause files
that were larger than the io.Copy internal buffer (32 * 1024) to stop
after the first chunk.
2012-07-13 14:57:50 -04:00
jim teeuwen
98c1704190 Combine the old and new code generation methods. We can select the .rodata hack described in issue #1 by supplying the -m commandline flag. The default code generation mode is the old one. While it uses more memory, it is a safer version and offers no problems when used on platforms that restrict usage of the unsafe and reflect packages. Additionally I did some cleanup and refactoring of the code. Bumped version to 1.0.0 2012-06-22 14:12:15 +02:00