Wrap obj->len in an accessor function