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
ccdfd363
Commit
ccdfd363
authored
Apr 24, 2024
by
Levin Zimmermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! proto/msgpack: Fix encoding INVALID_{TID,OID}
This is the decoding part of
37dd83e9
parent
d779695c
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1401 additions
and
751 deletions
+1401
-751
go/neo/proto/protogen.go
go/neo/proto/protogen.go
+7
-2
go/neo/proto/zproto-marshal.go
go/neo/proto/zproto-marshal.go
+1394
-749
No files found.
go/neo/proto/protogen.go
View file @
ccdfd363
...
...
@@ -1095,13 +1095,18 @@ func (d *decoderM) expectEnum(assignto string, enumType int) {
}
func
(
d
*
decoderM
)
genBasic
(
assignto
string
,
typ
*
types
.
Basic
,
userType
types
.
Type
)
{
// zodb.Tid and zodb.Oid are encoded as [8]bin
// zodb.Tid and zodb.Oid are encoded as [8]bin
or Nil
if
userType
==
zodbTid
||
userType
==
zodbOid
{
d
.
emit
(
"if data[%v] == byte(msgpack.Nil) {"
,
d
.
n
)
d
.
emit
(
"%s = %s(%v)"
,
assignto
,
typeName
(
userType
),
INVALID_ID
)
d
.
emit
(
"data = data[%v:]"
,
d
.
n
+
1
)
d
.
emit
(
"} else {"
)
d
.
expectBin8Fix
(
assignto
,
8
)
d
.
emit
(
"%s= %s(binary.BigEndian.Uint64(data[%v:]))"
,
assignto
,
typeName
(
userType
),
d
.
n
)
d
.
n
+=
8
d
.
overflow
.
Add
(
8
)
d
.
resetPos
()
d
.
emit
(
"}"
)
return
}
...
...
go/neo/proto/zproto-marshal.go
View file @
ccdfd363
This diff is collapsed.
Click to expand it.
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