Commit 049293ed authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 5108bb3d
This diff is collapsed.
......@@ -213,7 +213,7 @@ func (d *decoder) generatedCode() string {
}
func (e *encoder) genPrologue(recvName, typeName string) {
e.emit("func (%s *%s) NEOEncode(data []byte) (int, error) {", recvName, typeName)
e.emit("func (%s *%s) NEOEncode(data []byte) int /*(int, error)*/ {", recvName, typeName)
e.emit("var nwrote uint32")
}
......@@ -225,7 +225,7 @@ func (d *decoder) genPrologue(recvName, typeName string) {
func (e *encoder) genEpilogue() {
e.emit("return int(nwrote) + %v /*, nil*/", e.n)
e.emit("\noverflow:")
e.emit("panic() //return 0, ErrDecodeOverflow")
e.emit("panic(0) //return 0, ErrEncodeOverflow")
e.emit("}")
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment