In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/c8e503bfe4136506c95da755e0400990f539bb6a?hp=459fc3ca45067f8a2b7f262f7aac0a99372c2a88>

- Log -----------------------------------------------------------------
commit c8e503bfe4136506c95da755e0400990f539bb6a
Author: Nicholas Clark <[email protected]>
Date:   Sat Jul 18 19:32:50 2009 +0100

    Eliminate *_ALLOCATED_HEAD and *_HEAD macros which are now used only once.

M       av.h
M       hv.h
M       perl.h
M       sv.h

commit 828dad175cf45f4e83d61df735a510f0314063c8
Author: Nicholas Clark <[email protected]>
Date:   Sat Jul 18 18:34:06 2009 +0100

    Eliminate the remaining definitions for *_allocated structs.

M       av.h
M       cv.h
M       hv.h
M       sv.h
-----------------------------------------------------------------------

Summary of changes:
 av.h   |   20 +++-----------------
 cv.h   |    6 ------
 hv.h   |   20 +++-----------------
 perl.h |    1 -
 sv.h   |   22 ++--------------------
 5 files changed, 8 insertions(+), 61 deletions(-)

diff --git a/av.h b/av.h
index 77df033..f8c9d1b 100644
--- a/av.h
+++ b/av.h
@@ -8,27 +8,13 @@
  *
  */
 
-#define _XPVAV_ALLOCATED_HEAD                                          \
-    SSize_t    xav_fill;       /* Index of last element present */     \
-    SSize_t    xav_max         /* max index for which array has space */
-
-#define _XPVAV_HEAD    \
-    union _xnvu xnv_u; \
-    _XPVAV_ALLOCATED_HEAD
-
 struct xpvav {
-    _XPVAV_HEAD;
+    union _xnvu xnv_u;
+    SSize_t    xav_fill;       /* Index of last element present */
+    SSize_t    xav_max;        /* max index for which array has space */
     _XPVMG_HEAD;
 };
 
-typedef struct {
-    _XPVAV_ALLOCATED_HEAD;
-    _XPVMG_HEAD;
-} xpvav_allocated;
-
-#undef _XPVAV_ALLOCATED_HEAD
-#undef _XPVAV_HEAD
-
 /* SV**        xav_alloc; */
 #define xav_alloc xiv_u.xivu_p1
 /* SV* xav_arylen; */
diff --git a/cv.h b/cv.h
index 2c21ec6..290019d 100644
--- a/cv.h
+++ b/cv.h
@@ -16,12 +16,6 @@ struct xpvcv {
     _XPVCV_COMMON;
 };
 
-typedef struct {
-    _XPV_ALLOCATED_HEAD;
-    _XPVMG_HEAD;
-    _XPVCV_COMMON;
-} xpvcv_allocated;
-
 /*
 =head1 Handy Values
 
diff --git a/hv.h b/hv.h
index 9322377..3906496 100644
--- a/hv.h
+++ b/hv.h
@@ -80,31 +80,17 @@ struct xpvhv_aux {
     struct mro_meta *xhv_mro_meta;
 };
 
-#define _XPVHV_ALLOCATED_HEAD                                              \
-    STRLEN     xhv_fill;       /* how full xhv_array currently is */       \
-    STRLEN     xhv_max         /* subscript of last element of xhv_array */
-
-#define _XPVHV_HEAD    \
-    union _xnvu xnv_u; \
-    _XPVHV_ALLOCATED_HEAD
-
 /* hash structure: */
 /* This structure must match the beginning of struct xpvmg in sv.h. */
 struct xpvhv {
-    _XPVHV_HEAD;
+    union _xnvu xnv_u;
+    STRLEN      xhv_fill;       /* how full xhv_array currently is */
+    STRLEN      xhv_max;        /* subscript of last element of xhv_array */
     _XPVMG_HEAD;
 };
 
 #define xhv_keys xiv_u.xivu_iv
 
-typedef struct {
-    _XPVHV_ALLOCATED_HEAD;
-    _XPVMG_HEAD;
-} xpvhv_allocated;
-
-#undef _XPVHV_ALLOCATED_HEAD
-#undef _XPVHV_HEAD
-
 /* hash a key */
 /* FYI: This is the "One-at-a-Time" algorithm by Bob Jenkins
  * from requirements by Colin Plumb.
diff --git a/perl.h b/perl.h
index 136bd53..41f4ab1 100644
--- a/perl.h
+++ b/perl.h
@@ -3407,7 +3407,6 @@ struct nexttoken {
 #include "utf8.h"
 
 /* defined in sv.c, but also used in [ach]v.c */
-#undef _XPV_ALLOCATED_HEAD
 #undef _XPV_HEAD
 #undef _XPVMG_HEAD
 #undef _XPVCV_COMMON
diff --git a/sv.h b/sv.h
index 90771a4..55674f6 100644
--- a/sv.h
+++ b/sv.h
@@ -398,13 +398,10 @@ perform the upgrade if necessary.  See C<svtype>.
 /* RV upwards. However, SVf_ROK and SVp_IOK are exclusive  */
 #define SVprv_WEAKREF   0x80000000  /* Weak reference */
 
-#define _XPV_ALLOCATED_HEAD                                            \
-    STRLEN     xpv_cur;        /* length of svu_pv as a C string */    \
-    STRLEN     xpv_len         /* allocated size */
-
 #define _XPV_HEAD      \
     union _xnvu xnv_u; \
-    _XPV_ALLOCATED_HEAD
+    STRLEN     xpv_cur;        /* length of svu_pv as a C string */    \
+    STRLEN     xpv_len         /* allocated size */
 
 union _xnvu {
     NV     xnv_nv;             /* numeric value, if any */
@@ -439,20 +436,11 @@ struct xpv {
     _XPV_HEAD;
 };
 
-typedef struct {
-    _XPV_ALLOCATED_HEAD;
-} xpv_allocated;
-
 struct xpviv {
     _XPV_HEAD;
     union _xivu xiv_u;
 };
 
-typedef struct {
-    _XPV_ALLOCATED_HEAD;
-    union _xivu xiv_u;
-} xpviv_allocated;
-
 #define xiv_iv xiv_u.xivu_iv
 
 struct xpvuv {
@@ -525,12 +513,6 @@ struct xpvfm {
     _XPVCV_COMMON;
 };
 
-typedef struct {
-    _XPV_ALLOCATED_HEAD;
-    _XPVMG_HEAD;
-    _XPVCV_COMMON;
-} xpvfm_allocated;
-
 #define _XPVIO_TAIL                                                    \
     PerlIO *   xio_ifp;        /* ifp and ofp are normally the same */ \
     PerlIO *   xio_ofp;        /* but sockets need separate streams */ \

--
Perl5 Master Repository

Reply via email to