forked from mirror/go-json
Remove debug code
This commit is contained in:
parent
f36e24c8ae
commit
b2f2a20f65
|
@ -2,7 +2,6 @@ package json
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -29,13 +28,7 @@ func mapassign(t *rtype, m unsafe.Pointer, key, val unsafe.Pointer)
|
||||||
|
|
||||||
func (d *mapDecoder) setKey(ctx *context, key interface{}) error {
|
func (d *mapDecoder) setKey(ctx *context, key interface{}) error {
|
||||||
header := (*interfaceHeader)(unsafe.Pointer(&key))
|
header := (*interfaceHeader)(unsafe.Pointer(&key))
|
||||||
if err := d.keyDecoder.decode(ctx, uintptr(header.ptr)); err != nil {
|
return d.keyDecoder.decode(ctx, uintptr(header.ptr))
|
||||||
return err
|
|
||||||
}
|
|
||||||
//fmt.Println("key = ", *(*string)(header.ptr))
|
|
||||||
//fmt.Println("Key = ", key.(*string))
|
|
||||||
//fmt.Println("key = ", *(*string)(unsafe.Pointer(key)))
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *mapDecoder) setValue(ctx *context, key interface{}) error {
|
func (d *mapDecoder) setValue(ctx *context, key interface{}) error {
|
||||||
|
@ -56,7 +49,6 @@ func (d *mapDecoder) decode(ctx *context, p uintptr) error {
|
||||||
}
|
}
|
||||||
cursor++
|
cursor++
|
||||||
mapValue := makemap(d.mapType, 0)
|
mapValue := makemap(d.mapType, 0)
|
||||||
fmt.Println("mapValue = ", mapValue)
|
|
||||||
for ; cursor < buflen; cursor++ {
|
for ; cursor < buflen; cursor++ {
|
||||||
ctx.cursor = cursor
|
ctx.cursor = cursor
|
||||||
var key interface{}
|
var key interface{}
|
||||||
|
|
Loading…
Reference in New Issue