Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
tiltwind committed May 4, 2023
1 parent 9dc1a19 commit 64ed78d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ func SetValue(dest, v reflect.Value) {
}

// check whether the v is a ref holder
if vType == _refHolderType {
if vType == _refHolderPtrType {
h := v.Interface().(*_refHolder)
h.add(dest)
return
Expand Down
4 changes: 2 additions & 2 deletions ref.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ var _emptySliceAddr = unsafe.Pointer(reflect.ValueOf([]interface{}{}).Pointer())
// The addresses of all nil map are the same.
var _nilMapAddr = unsafe.Pointer(reflect.ValueOf(map[interface{}]interface{}(nil)).Pointer())

// the ref holder type.
var _refHolderType = reflect.TypeOf(&_refHolder{})
// the ref holder pointer type.
var _refHolderPtrType = reflect.TypeOf(&_refHolder{})

// used to ref object,list,map
type _refElem struct {
Expand Down

0 comments on commit 64ed78d

Please sign in to comment.