Browse Source

[skip ci] update comment

tags/v2.0.1
Achille Roussel 2 years ago
parent
commit
387ad0d10f
1 changed files with 1 additions and 3 deletions
  1. 1
    3
      event_unsafe.go

+ 1
- 3
event_unsafe.go View File

@@ -10,9 +10,7 @@ import (
func cloneValue(v interface{}) interface{} {
// Some sub-packages use optimizations that hack the type system by sharing
// pointers to avoid generated calls to runtime.convT2E, this functions
// basically does the opposite and ensures that runtime.convT2E is called
// to generate new values to ensure no more pointers are shared by cloned
// events.
// basically does the opposite and ensures that a new value is created.
rv := reflect.ValueOf(v)
nv := reflect.New(rv.Type()).Elem()
nv.Set(rv)

Loading…
Cancel
Save