mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-15 08:23:41 +00:00
reflect: add more stubs for encoding/binary
Package encoding/binary uses reflect and is needed by image/png, but image/png doesn't actually need the reflect-using parts of encoding/binary. So stub them out for now to get it to compile. Thanks to Stephen Solka who wrote the patch.
This commit is contained in:
@@ -65,6 +65,19 @@ func (t Type) Bits() int {
|
|||||||
panic("unimplemented: (reflect.Type).Bits()")
|
panic("unimplemented: (reflect.Type).Bits()")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (t Type) Len() int {
|
||||||
|
panic("unimplemented: (reflect.Type).Len()")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (t Type) NumField() int {
|
||||||
|
panic("unimplemented: (reflect.Type).NumField()")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (t Type) Size() uintptr {
|
||||||
|
panic("unimplemented: (reflect.Type).Size()")
|
||||||
|
}
|
||||||
|
|
||||||
type StructField struct {
|
type StructField struct {
|
||||||
Name string
|
Name string
|
||||||
|
Type Type
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,10 @@ type Value struct {
|
|||||||
value *uint8
|
value *uint8
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Indirect(v Value) Value {
|
||||||
|
return v
|
||||||
|
}
|
||||||
|
|
||||||
func ValueOf(i interface{}) Value
|
func ValueOf(i interface{}) Value
|
||||||
|
|
||||||
//go:linkname _ValueOf reflect.ValueOf
|
//go:linkname _ValueOf reflect.ValueOf
|
||||||
@@ -51,6 +55,10 @@ func (v Value) Addr() Value {
|
|||||||
panic("unimplemented: (reflect.Value).Addr()")
|
panic("unimplemented: (reflect.Value).Addr()")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (v Value) CanSet() bool {
|
||||||
|
panic("unimplemented: (reflect.Value).CanSet()")
|
||||||
|
}
|
||||||
|
|
||||||
func (v Value) Bool() bool {
|
func (v Value) Bool() bool {
|
||||||
panic("unimplemented: (reflect.Value).Bool()")
|
panic("unimplemented: (reflect.Value).Bool()")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user