You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-12-20 23:30:38 +02:00
move type declaration into separate files
This commit is contained in:
@@ -28,6 +28,7 @@ func (decoder *OptionalDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) {
|
||||
*((*unsafe.Pointer)(ptr)) = nil
|
||||
} else {
|
||||
if *((*unsafe.Pointer)(ptr)) == nil {
|
||||
// TODO: use reflect2 instead
|
||||
//pointer to null, we have to allocate memory to hold the value
|
||||
value := reflect.New(decoder.ValueType)
|
||||
newPtr := extractInterface(value.Interface()).word
|
||||
|
||||
Reference in New Issue
Block a user