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
a54ac5f3
Commit
a54ac5f3
authored
Jan 19, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
049293ed
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
184 additions
and
176 deletions
+184
-176
t/neo/marshal.go
t/neo/marshal.go
+174
-174
t/neo/proto.go
t/neo/proto.go
+8
-0
t/neo/protogen.go
t/neo/protogen.go
+2
-2
No files found.
t/neo/marshal.go
View file @
a54ac5f3
This diff is collapsed.
Click to expand it.
t/neo/proto.go
View file @
a54ac5f3
...
...
@@ -143,6 +143,14 @@ func byte2bool(b byte) bool {
return
b
!=
0
}
func
bool2byte
(
b
bool
)
byte
{
if
b
{
return
1
}
else
{
return
0
}
}
// NOTE py.None encodes as '\xff' * 8 (-> we use NaN for None)
// NOTE '\xff' * 8 represents FP NaN but many other NaN bits representation exist
func
float64_NEOEncode
(
b
[]
byte
,
f
float64
)
{
...
...
t/neo/protogen.go
View file @
a54ac5f3
...
...
@@ -224,8 +224,8 @@ func (d *decoder) genPrologue(recvName, typeName string) {
func
(
e
*
encoder
)
genEpilogue
()
{
e
.
emit
(
"return int(nwrote) + %v /*, nil*/"
,
e
.
n
)
e
.
emit
(
"
\n
overflow:"
)
e
.
emit
(
"panic(0) //return 0, ErrEncodeOverflow"
)
e
.
emit
(
"
\n
/*
overflow:"
)
e
.
emit
(
"panic(0)
*/
//return 0, ErrEncodeOverflow"
)
e
.
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