[svn:parrot] r41684 - in branches/pcc_reapply: src/call t/codingstd

jkeenan at svn.parrot.org jkeenan at svn.parrot.org
Sun Oct 4 12:36:28 UTC 2009


Author: jkeenan
Date: Sun Oct  4 12:36:28 2009
New Revision: 41684
URL: https://trac.parrot.org/parrot/changeset/41684

Log:
Better solution:  Modify codingstd to allow more flexibility in lines
beginning with 'typedef'.

Modified:
   branches/pcc_reapply/src/call/args.c
   branches/pcc_reapply/t/codingstd/c_parens.t

Modified: branches/pcc_reapply/src/call/args.c
==============================================================================
--- branches/pcc_reapply/src/call/args.c	Sun Oct  4 12:17:26 2009	(r41683)
+++ branches/pcc_reapply/src/call/args.c	Sun Oct  4 12:36:28 2009	(r41684)
@@ -33,8 +33,8 @@
 typedef STRING**  (*string_func_t)(PARROT_INTERP, void *arg_info, INTVAL index);
 typedef PMC**     (*pmc_func_t)   (PARROT_INTERP, void *arg_info, INTVAL index);
 
-typedef INTVAL (*intval_constant_func_t)(PARROT_INTERP, void *arg_info, INTVAL index);
-typedef FLOATVAL (*numval_constant_func_t)(PARROT_INTERP, void *arg_info, INTVAL index);
+typedef INTVAL    (*intval_constant_func_t)(PARROT_INTERP, void *arg_info, INTVAL index);
+typedef FLOATVAL  (*numval_constant_func_t)(PARROT_INTERP, void *arg_info, INTVAL index);
 typedef STRING*   (*string_constant_func_t)(PARROT_INTERP, void *arg_info, INTVAL index);
 typedef PMC*      (*pmc_constant_func_t)   (PARROT_INTERP, void *arg_info, INTVAL index);
 

Modified: branches/pcc_reapply/t/codingstd/c_parens.t
==============================================================================
--- branches/pcc_reapply/t/codingstd/c_parens.t	Sun Oct  4 12:17:26 2009	(r41683)
+++ branches/pcc_reapply/t/codingstd/c_parens.t	Sun Oct  4 12:36:28 2009	(r41684)
@@ -90,7 +90,8 @@
 
         my @lines = split( /\n/, $buf );
         for my $line (@lines) {
-            next if $line =~ m{#\s*define};    # skip #defines
+            # skip #defines and typedefs
+            next if $line =~ m{(?:(#\s*define|^\s*typedef))};
             if ( $line =~ m{ ( (?<!\w) (?:$keywords) (?: \( | \ \s+ \( ) ) }xo ) {
                 my $paren = $1;
 


More information about the parrot-commits mailing list