develooper Front page | perl.perl6.internals | Postings from July 2002

[perl #15574] [PATCH] RECALL renamed to AVOID

Thread Next
From:
Tanton Gibbs
Date:
July 25, 2002 11:36
Subject:
[perl #15574] [PATCH] RECALL renamed to AVOID
Message ID:
rt-15574-31636.16.2987822338887@perl
# New Ticket Created by  "Tanton Gibbs" 
# Please include the string:  [perl #15574]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=15574 >


This patch implements the AGAIN pmc preprocessor command.  AGAIN should be
used after a PMC type change.  For example, the following function
illustrates AGAIN:

# in perlint.pmc
void set_string( PMC* string ) {
  CHANGE_TYPE( SELF, PerlString );
  AGAIN;
}

In this situation, AGAIN calls set_string on SELF's
vtable which now points to a perl string PMC type.  This
ensures that the same semantics are kept no matter what PMC type is used and
if any problems are found, they only have to be fixed in one place.

I also added comments to pmc2c.pl to explain what
the program was doing.  I added a sample grammar
at the top, etc..

Finally, I made some minor style modifications to perlint.pmc and
perlnum.pmc.

Thanks,
Tanton


-- attachment  1 ------------------------------------------------------
url: http://rt.perl.org/rt2/attach/31636/26319/21d14f/diff.out


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About