]> git.vpit.fr Git - perl/modules/Lexical-Types.git/commitdiff
Decide to use shared op info according to MULTIPLICITY
authorVincent Pit <vince@profvince.com>
Sat, 4 Jul 2009 10:46:04 +0000 (12:46 +0200)
committerVincent Pit <vince@profvince.com>
Sat, 4 Jul 2009 10:46:04 +0000 (12:46 +0200)
And not LT_MULTIPLICITY, since it can be disabled at configure time.

Types.xs

index a01cc1525e7208324f0eb6ab243d6b5118124bf6..a560b2df6d7c22e5e1a06755323f2b0b8ed421ea 100644 (file)
--- a/Types.xs
+++ b/Types.xs
@@ -319,14 +319,14 @@ STATIC perl_mutex lt_op_map_mutex;
 #endif
 
 typedef struct {
-#if LT_MULTIPLICITY
+#ifdef MULTIPLICITY
  STRLEN buf_size, orig_pkg_len, type_pkg_len, type_meth_len;
  char *buf;
-#else /* LT_MULTIPLICITY */
+#else /* MULTIPLICITY */
  SV *orig_pkg;
  SV *type_pkg;
  SV *type_meth;
-#endif /* !LT_MULTIPLICITY */
+#endif /* !MULTIPLICITY */
  OP *(*pp_padsv)(pTHX);
 } lt_op_info;
 
@@ -341,18 +341,18 @@ STATIC void lt_map_store(pPTBLMS_ const OP *o, SV *orig_pkg, SV *type_pkg, SV *t
  if (!(oi = ptable_fetch(lt_op_map, o))) {
   oi = PerlMemShared_malloc(sizeof *oi);
   ptable_map_store(lt_op_map, o, oi);
-#if LT_MULTIPLICITY
+#ifdef MULTIPLICITY
   oi->buf      = NULL;
   oi->buf_size = 0;
-#else /* LT_MULTIPLICITY */
+#else /* MULTIPLICITY */
  } else {
   SvREFCNT_dec(oi->orig_pkg);
   SvREFCNT_dec(oi->type_pkg);
   SvREFCNT_dec(oi->type_meth);
-#endif /* !LT_MULTIPLICITY */
+#endif /* !MULTIPLICITY */
  }
 
-#if LT_MULTIPLICITY
+#ifdef MULTIPLICITY
  {
   STRLEN op_len       = SvCUR(orig_pkg);
   STRLEN tp_len       = SvCUR(type_pkg);
@@ -374,11 +374,11 @@ STATIC void lt_map_store(pPTBLMS_ const OP *o, SV *orig_pkg, SV *type_pkg, SV *t
   oi->type_pkg_len  = tp_len;
   oi->type_meth_len = tm_len;
  }
-#else /* LT_MULTIPLICITY */
+#else /* MULTIPLICITY */
  oi->orig_pkg  = orig_pkg;
  oi->type_pkg  = type_pkg;
  oi->type_meth = type_meth;
-#endif /* !LT_MULTIPLICITY */
+#endif /* !MULTIPLICITY */
 
  oi->pp_padsv  = pp_padsv;
 
@@ -439,7 +439,7 @@ STATIC OP *lt_pp_padsv(pTHX) {
    ENTER;
    SAVETMPS;
 
-#if LT_MULTIPLICITY
+#ifdef MULTIPLICITY
    {
     STRLEN op_len = oi.orig_pkg_len, tp_len = oi.type_pkg_len;
     char *buf = oi.buf;
@@ -452,11 +452,11 @@ STATIC OP *lt_pp_padsv(pTHX) {
     type_meth = sv_2mortal(newSVpvn(buf, oi.type_meth_len));
     SvREADONLY_on(type_meth);
    }
-#else /* LT_MULTIPLICITY */
+#else /* MULTIPLICITY */
    orig_pkg  = oi.orig_pkg;
    type_pkg  = oi.type_pkg;
    type_meth = oi.type_meth;
-#endif /* !LT_MULTIPLICITY */
+#endif /* !MULTIPLICITY */
 
    PUSHMARK(SP);
    EXTEND(SP, 3);