summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-02-20 10:10:11 +0000
committerNicholas Clark <nick@ccl4.org>2006-02-20 10:10:11 +0000
commit7c60e4340985406f3dd47ad08209883de1b8aa3b (patch)
treeee90e5434f8c17bc932b29bf9ac0b11463a524f7 /ext
parentdca5a9130eb9e045fd52f88cf3dedee7093e19f7 (diff)
downloadperl-7c60e4340985406f3dd47ad08209883de1b8aa3b.tar.gz
Abolish BROKEN_UNION_INIT in B::C, as it works around problems in
pre-ANSI C compilers, but pays in code duplication. p4raw-id: //depot/perl@27240
Diffstat (limited to 'ext')
-rw-r--r--ext/B/B/C.pm43
1 files changed, 4 insertions, 39 deletions
diff --git a/ext/B/B/C.pm b/ext/B/B/C.pm
index 1179767b2c..17ca25788b 100644
--- a/ext/B/B/C.pm
+++ b/ext/B/B/C.pm
@@ -8,7 +8,7 @@
package B::C;
-our $VERSION = '1.04';
+our $VERSION = '1.05';
package B::C::Section;
@@ -1416,46 +1416,11 @@ sub output_declarations {
#endif /* BROKEN_STATIC_REDECL */
#ifdef BROKEN_UNION_INIT
-/*
- * Cribbed from cv.h with ANY (a union) replaced by void*.
- * Some pre-Standard compilers can't cope with initialising unions. Ho hum.
- */
-typedef struct {
- STRLEN xpv_cur; /* length of xp_pv as a C string */
- STRLEN xpv_len; /* allocated size */
- IV xof_off; /* integer value */
- NV xnv_nv; /* numeric value, if any */
- MAGIC* xmg_magic; /* magic for scalar array */
- HV* xmg_stash; /* class package */
-
- HV * xcv_stash;
- OP * xcv_start;
- OP * xcv_root;
- void (*xcv_xsub) (pTHX_ CV*);
- ANY xcv_xsubany;
- GV * xcv_gv;
- char * xcv_file;
- long xcv_depth; /* >= 2 indicates recursive call */
- AV * xcv_padlist;
- CV * xcv_outside;
-EOT
- print <<'EOT' if $] < 5.009;
-#ifdef USE_5005THREADS
- perl_mutex *xcv_mutexp;
- struct perl_thread *xcv_owner; /* current owner thread */
-#endif /* USE_5005THREADS */
-EOT
- print <<'EOT';
- cv_flags_t xcv_flags;
- U32 xcv_outside_seq; /* the COP sequence (at the point of our
- * compilation) in the lexically enclosing
- * sub */
-} XPVCV_or_similar;
-#define ANYINIT(i) i
-#else
+#error BROKEN_UNION_INIT no longer needed, as Perl requires an ANSI compiler
+#endif
+
#define XPVCV_or_similar XPVCV
#define ANYINIT(i) {i}
-#endif /* BROKEN_UNION_INIT */
#define Nullany ANYINIT(0)
#define UNUSED 0