Skip to content

Commit

Permalink
Add float64 operations to reflect unsafe (#1158)
Browse files Browse the repository at this point in the history
* Add float64 operations to reflect unsafe

* Fix typo
  • Loading branch information
mhmtszr authored Jul 7, 2023
1 parent e2a66a2 commit 72279f4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions protocol/reflect_unsafe.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ func (v value) int32() int32 { return *(*int32)(v.ptr) }

func (v value) int64() int64 { return *(*int64)(v.ptr) }

func (v value) float64() float64 { return *(*float64)(v.ptr) }

func (v value) string() string { return *(*string)(v.ptr) }

func (v value) bytes() []byte { return *(*[]byte)(v.ptr) }
Expand Down Expand Up @@ -92,6 +94,8 @@ func (v value) setInt32(i int32) { *(*int32)(v.ptr) = i }

func (v value) setInt64(i int64) { *(*int64)(v.ptr) = i }

func (v value) setFloat64(f float64) { *(*float64)(v.ptr) = f }

func (v value) setString(s string) { *(*string)(v.ptr) = s }

func (v value) setBytes(b []byte) { *(*[]byte)(v.ptr) = b }
Expand Down

0 comments on commit 72279f4

Please sign in to comment.