Re: VTABLE_elements

2007-12-29 Thread Allison Randal
ss someone wants to write a PMC that does return a negative number for VTABLE_elements and have that number be significant in some way. The vtable functions define a standard interface for all PMCs and they use a standard set of types: INTVAL, FLOATVAL, STRING*, and PMC*. These, unsurprisingly

Re: VTABLE_elements

2007-12-29 Thread Andy Lester
What about when you want to implement things like, element -1 gets the last element of the array? That's the case in some languages, I believe... Yes, but we're talking about returning the number of elements in a PMC. That should never be negative. -- Andy Lester => [EMAIL PROTECTED]

Re: VTABLE_elements

2007-12-29 Thread Jonathan Worthington
chromatic wrote: On Friday 28 December 2007 07:09:24 Andy Lester wrote: Should we be allowing negative in the PMC elements() functions? Seems to me they'd be more appropriate as UINTVALs. I can't think of any reason they could be negative. Can you make a patch to convert them and s

Re: VTABLE_elements

2007-12-28 Thread Andy Lester
On Dec 28, 2007, at 12:17 PM, chromatic wrote: Should we be allowing negative in the PMC elements() functions? Seems to me they'd be more appropriate as UINTVALs. I can't think of any reason they could be negative. Can you make a patch to convert them and see if anything breaks? A

Re: VTABLE_elements

2007-12-28 Thread chromatic
On Friday 28 December 2007 07:09:24 Andy Lester wrote: > Should we be allowing negative in the PMC elements() functions? Seems > to me they'd be more appropriate as UINTVALs. I can't think of any reason they could be negative. Can you make a patch to convert them and see if anything breaks? -

VTABLE_elements

2007-12-28 Thread Andy Lester
Should we be allowing negative in the PMC elements() functions? Seems to me they'd be more appropriate as UINTVALs. xoa -- Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance