This commit is contained in:
aozhiwei 2021-01-22 13:56:55 +08:00
parent bc3b2825a6
commit 562242ca3f

View File

@ -35,6 +35,9 @@ func (this *XObject) Size() int {
if (this._type == XOT_ARRAY) { if (this._type == XOT_ARRAY) {
array := this._val.([]*XObject) array := this._val.([]*XObject)
return len(array) return len(array)
} else if (this._type == XOT_OBJECT) {
object := this._val.(map[string]*XObject)
return len(object)
} else { } else {
panic("XObject.Size type error") panic("XObject.Size type error")
return 0 return 0