[perl #39329] [CAGE] Check to make sure PMC_str_val, etc. are used appropriately

Klaas-Jan Stol via RT parrotbug-followup at parrotcode.org
Sat Nov 29 23:25:52 UTC 2008


On Wed May 07 07:35:46 2008, pmichaud wrote:
> On Tue, May 06, 2008 at 09:38:56PM -0700, Patrick R. Michaud via RT 
wrote:
> > I think this ticket is ready to be closed.  A lot of the PMC_* items
> > were likely fixed as part of the pdd15oo change, and the problem I 
cited
> > has apparently been fixed.
> 
> Looking a bit further, there are still a few instances of PMC_int_val
> in MMD routines in integer.pmc that look suspicious to me.
> 
> For example, src/pmc/integer.pmc lines 414-417 read:
> 
>     MMD_DEFAULT: {
>         VTABLE_set_number_native(INTERP, SELF,
>             PMC_int_val(SELF) + VTABLE_get_number(INTERP, value));
>         }
> 
> and it's not clear if that PMC_int_val(SELF) needs to be
> SELF.get_integer() .
> 
> Also, the code itself seems a little inconsistent:  In some 
> places we have   SELF.get_integer()  and other places have  
> VTABLE_get_integer(INTERP, SELF) -- and it's not entirely clear
> why one would be used over the other.  Overall, the sections of
> code that I perused seem to lean towards the .get_integer() form.
> 
> I don't know if we need similar reviews for string.pmc and float.pmc.
> But this ticket seems sort of nebulous -- how will we know when to
> close it?
> 
> Pm
> 

I think this issue was related to the old MMD system. If so, then I 
suspect this ticket can be closed.

Please have a look at this issue, and close it/let know whether it can 
be closed.

Thank you very much,

kjs






More information about the parrot-dev mailing list