forked from jshiffer/go-xmpp
fixed reflection package usage with gofix for current go version
This commit is contained in:
parent
08d0d26b2d
commit
73126a5d4b
6
xmpp.go
6
xmpp.go
@ -420,9 +420,9 @@ func next(p *xml.Parser) (xml.Name, interface{}, os.Error) {
|
||||
|
||||
// The map lookup got us a pointer.
|
||||
// Put it in an interface and allocate one.
|
||||
pv := reflect.NewValue(v).(*reflect.PtrValue)
|
||||
zv := reflect.MakeZero(pv.Type().(*reflect.PtrType).Elem())
|
||||
pv.PointTo(zv)
|
||||
pv := reflect.ValueOf(v)
|
||||
zv := reflect.Zero(pv.Type().Elem())
|
||||
pv.Set(zv.Addr())
|
||||
|
||||
// Unmarshal into that storage.
|
||||
if err = p.Unmarshal(pv.Interface(), &se); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user