note: InvokeCode.Code has data reference of param source
(source *common.ZeroCopySource)
| 34 | |
| 35 | //note: InvokeCode.Code has data reference of param source |
| 36 | func (self *InvokeCode) Deserialization(source *common.ZeroCopySource) error { |
| 37 | code, _, irregular, eof := source.NextVarBytes() |
| 38 | if eof { |
| 39 | return io.ErrUnexpectedEOF |
| 40 | } |
| 41 | if irregular { |
| 42 | return common.ErrIrregularData |
| 43 | } |
| 44 | |
| 45 | self.Code = code |
| 46 | return nil |
| 47 | } |
| 48 | |
| 49 | func (self *InvokeCode) Serialization(sink *common.ZeroCopySink) { |
| 50 | sink.WriteVarBytes(self.Code) |