Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
18bec87d
Commit
18bec87d
authored
Jan 19, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a54ac5f3
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
352 additions
and
176 deletions
+352
-176
t/neo/marshal.go
t/neo/marshal.go
+348
-174
t/neo/protogen.go
t/neo/protogen.go
+4
-2
No files found.
t/neo/marshal.go
View file @
18bec87d
This diff is collapsed.
Click to expand it.
t/neo/protogen.go
View file @
18bec87d
...
@@ -224,8 +224,9 @@ func (d *decoder) genPrologue(recvName, typeName string) {
...
@@ -224,8 +224,9 @@ func (d *decoder) genPrologue(recvName, typeName string) {
func
(
e
*
encoder
)
genEpilogue
()
{
func
(
e
*
encoder
)
genEpilogue
()
{
e
.
emit
(
"return int(nwrote) + %v /*, nil*/"
,
e
.
n
)
e
.
emit
(
"return int(nwrote) + %v /*, nil*/"
,
e
.
n
)
e
.
emit
(
"
\n
/*overflow:"
)
e
.
emit
(
"
\n
overflow:"
)
e
.
emit
(
"panic(0) */ //return 0, ErrEncodeOverflow"
)
e
.
emit
(
"panic(0) //return 0, ErrEncodeOverflow"
)
e
.
emit
(
"goto overflow"
)
// TODO remove
e
.
emit
(
"}"
)
e
.
emit
(
"}"
)
}
}
...
@@ -233,6 +234,7 @@ func (d *decoder) genEpilogue() {
...
@@ -233,6 +234,7 @@ func (d *decoder) genEpilogue() {
d
.
emit
(
"return int(nread) + %v, nil"
,
d
.
n
)
d
.
emit
(
"return int(nread) + %v, nil"
,
d
.
n
)
d
.
emit
(
"
\n
overflow:"
)
d
.
emit
(
"
\n
overflow:"
)
d
.
emit
(
"return 0, ErrDecodeOverflow"
)
d
.
emit
(
"return 0, ErrDecodeOverflow"
)
d
.
emit
(
"goto overflow"
)
// TODO remove
d
.
emit
(
"}"
)
d
.
emit
(
"}"
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment