mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-05-23 12:23:46 -07:00
Merge pull request #1 from Kissaki/master
fixed reflection package usage with gofix for current go version
This commit is contained in:
@@ -420,9 +420,9 @@ func next(p *xml.Parser) (xml.Name, interface{}, os.Error) {
|
|||||||
|
|
||||||
// The map lookup got us a pointer.
|
// The map lookup got us a pointer.
|
||||||
// Put it in an interface and allocate one.
|
// Put it in an interface and allocate one.
|
||||||
pv := reflect.NewValue(v).(*reflect.PtrValue)
|
pv := reflect.ValueOf(v)
|
||||||
zv := reflect.MakeZero(pv.Type().(*reflect.PtrType).Elem())
|
zv := reflect.Zero(pv.Type().Elem())
|
||||||
pv.PointTo(zv)
|
pv.Set(zv.Addr())
|
||||||
|
|
||||||
// Unmarshal into that storage.
|
// Unmarshal into that storage.
|
||||||
if err = p.Unmarshal(pv.Interface(), &se); err != nil {
|
if err = p.Unmarshal(pv.Interface(), &se); err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user