Remove debug code

This commit is contained in:
Masaaki Goshima 2020-04-25 22:49:37 +09:00
parent f36e24c8ae
commit b2f2a20f65
1 changed files with 1 additions and 9 deletions

View File

@ -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{}