-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d016c8c
commit cdc9f9b
Showing
4 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package rpc | ||
|
||
type arg struct { | ||
x bool | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Auto-generated from spec "github.com/mit-pdos/pav/rpc/testdata/bool/bool.go" | ||
// using compiler "github.com/mit-pdos/pav/rpc". | ||
package rpc | ||
|
||
import ( | ||
"github.com/mit-pdos/pav/marshalutil" | ||
"github.com/tchajed/marshal" | ||
) | ||
|
||
type errorTy = bool | ||
|
||
const ( | ||
errNone errorTy = false | ||
errSome errorTy = true | ||
) | ||
|
||
func (o *arg) encode() []byte { | ||
var b = make([]byte, 0) | ||
b = marshalutil.WriteBool(b, o.x) | ||
return b | ||
} | ||
func (o *arg) decode(b0 []byte) ([]byte, errorTy) { | ||
var b = b0 | ||
x, b, err := marshalutil.ReadBool(b) | ||
if err { | ||
return nil, err | ||
} | ||
o.x = x | ||
return b, errNone | ||
} |