[Jifty-commit] r5734 - B-Generate/trunk/lib/B

Jifty commits jifty-commit at lists.jifty.org
Sat Aug 16 11:34:55 EDT 2008


Author: clkao
Date: Sat Aug 16 11:34:55 2008
New Revision: 5734

Modified:
   B-Generate/trunk/lib/B/Generate.xs

Log:
A bit more cleanup with OP_CUSTOM_OPS macro

Modified: B-Generate/trunk/lib/B/Generate.xs
==============================================================================
--- B-Generate/trunk/lib/B/Generate.xs	(original)
+++ B-Generate/trunk/lib/B/Generate.xs	Sat Aug 16 11:34:55 2008
@@ -735,10 +735,7 @@
 	SAVE_VARS;
         typenum = op_name_to_num(type);
         o = newOP(typenum, flags);
-#ifdef PERL_CUSTOM_OPS
-        if (typenum == OP_CUSTOM)
-            o->op_ppaddr = custom_op_ppaddr(SvPV_nolen(type));
-#endif
+        OP_CUSTOM_OPS;
         RESTORE_VARS;
         ST(0) = sv_newmortal();
         sv_setiv(newSVrv(ST(0), "B::OP"), PTR2IV(o));
@@ -838,10 +835,7 @@
 	SAVE_VARS;
         typenum = op_name_to_num(type);
         o = newUNOP(typenum, flags, first);
-#ifdef PERL_CUSTOM_OPS
-        if (typenum == OP_CUSTOM)
-            o->op_ppaddr = custom_op_ppaddr(SvPV_nolen(type));
-#endif
+        OP_CUSTOM_OPS;
         RESTORE_VARS;
         }
         ST(0) = sv_newmortal();
@@ -911,10 +905,7 @@
             o = newASSIGNOP(flags, first, 0, last);
         else {
             o = newBINOP(typenum, flags, first, last);
-#ifdef PERL_CUSTOM_OPS
-            if (typenum == OP_CUSTOM)
-                o->op_ppaddr = custom_op_ppaddr(SvPV_nolen(type));
-#endif
+            OP_CUSTOM_OPS;
         }
 
         RESTORE_VARS;
@@ -966,10 +957,7 @@
 
 	SAVE_VARS;
         o = newLISTOP(typenum, flags, first, last);
-#ifdef PERL_CUSTOM_OPS
-        if (typenum == OP_CUSTOM)
-            o->op_ppaddr = custom_op_ppaddr(SvPV_nolen(type));
-#endif
+        OP_CUSTOM_OPS;
 	RESTORE_VARS;
         }
         ST(0) = sv_newmortal();
@@ -1018,10 +1006,7 @@
         I32 typenum  = op_name_to_num(type);
 	SAVE_VARS;
         o = newLOGOP(typenum, flags, first, last);
-#ifdef PERL_CUSTOM_OPS
-        if (typenum == OP_CUSTOM)
-            o->op_ppaddr = custom_op_ppaddr(SvPV_nolen(type));
-#endif
+        OP_CUSTOM_OPS;
         RESTORE_VARS;
         }
         ST(0) = sv_newmortal();


More information about the Jifty-commit mailing list