Can you explain the logic here? Why do we set `priv->size = length` if `length > 0` and do the opposite otherwise?