Skip to content

Commit 72279f4

Browse files
authored
Add float64 operations to reflect unsafe (#1158)
* Add float64 operations to reflect unsafe * Fix typo
1 parent e2a66a2 commit 72279f4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

protocol/reflect_unsafe.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ func (v value) int32() int32 { return *(*int32)(v.ptr) }
6363

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

66+
func (v value) float64() float64 { return *(*float64)(v.ptr) }
67+
6668
func (v value) string() string { return *(*string)(v.ptr) }
6769

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

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

97+
func (v value) setFloat64(f float64) { *(*float64)(v.ptr) = f }
98+
9599
func (v value) setString(s string) { *(*string)(v.ptr) = s }
96100

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

0 commit comments

Comments
 (0)