On Mon, Sep 22, 2008 at 12:34 AM, NotFound <[EMAIL PROTECTED]> wrote:
>>> +=item C<void delete_keyed_int(INTVAL key)>
>>> +
>>> +Removes the element at C<key>.
>>> +
>>> +=cut
>>> +
>>> +*/
>>> +
>>> +    VTABLE void delete_keyed_int(INTVAL key) {
>>> +        INTVAL size = PMC_int_val(SELF);
>>
>> With the use of the set_integer_native entry later, this should probably be:
>>
>>        INTVAL size = SELF.get_integer();
>
> I borrowed it from the shift and unshift functions. Maybe a complete
> revision of this PMC will be the way to go. I'll take a look tomorrow.

After some looking: other functions on this pmc uses elements, that is
implemented in the parent, FixedIntegerArray.  FixedIntegerArray
implements get_integer by calling elements, so looks like elements is
the 'boss'.

Will be better to change FixedIntegerArray to implement elements by
calling get_integer? And then use get_integer in all relevant places
in ResizableIntegerArray? Looks more clear to me to get the value with
get_integer and set it with set_integer_native.

-- 
Salu2

Reply via email to