diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-09-18 15:00:31 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-09-18 15:00:31 +0000 |
commit | cf011bf2a936a61a12a0ad7b9716f5fb731b4905 (patch) | |
tree | 7881c0e4dffbfad82fd98e881f2e89de6c694c89 /toke.c | |
parent | 6b53674b033a93ec3c464355de95912b44d5ec19 (diff) | |
download | perl-cf011bf2a936a61a12a0ad7b9716f5fb731b4905.tar.gz |
Integrate:
[ 24444]
Subject: potential [PATCH] Tru64 crank up strictness
From: Jarkko Hietaniemi <jhietaniemi@gmail.com>
Date: May 10, 2005 7:44 PM
Message-Id: <4ADE5AAD-27CB-4F9E-BEC7-41DAA7671108@iki.fi>
[ 24461]
Subject: change to quiet cygwin's perlld
From: Yitzchak Scott-Thoennes <sthoenna@efn.org>
Date: Fri, 13 May 2005 06:15:45 -0700
Message-ID: <20050513131545.GB4024@efn.org>
[ 24539]
Subject: [PATCH] Enable 64bitall builds for Solaris x86
From: Gisle Aas <gisle@ActiveState.com>
Date: 21 May 2005 08:55:21 -0700
Message-ID: <lr1x801sly.fsf@caliper.activestate.com>
[ 24588]
-Wall is intolerably noisy with icc.
[ 24627]
Subject: Re: updated tru64 cc [PATCH]es (Re: [PATCH]es: Tru64/blead)
From: Jarkko Hietaniemi <jhietaniemi@gmail.com>
Date: Mon, 30 May 2005 09:15:56 +0300
Message-ID: <429AAF9C.30503@gmail.com>
[ 24628]
regen after #24627
[ 24630]
gcc hints were not yet applied to gcc-4.x
Now they are
[ 24644]
Add DECC to the symbol list
Subject: [PATCH]lette Re: updated tru64 cc [PATCH]es (Re: [PATCH]es: Tru64/blead)
From: Yitzchak Scott-Thoennes <sthoenna@efn.org>
Date: Mon, 30 May 2005 16:33:15 -0700
Message-ID: <20050530233315.GA3088@efn.org>
[ 24667]
HP-UX specific #pragma entered in #23890 is not supported
on HP-UX 10.20 and older
[ 24674]
CPP typo fix (by Dominic Dunlop)
[ 24981]
On OS X to use perl's malloc need to USE_PERL_SBRK and emulate sbrk()
using system malloc, because sbrk() stops giving us memory after about
14Mb.
[ 25004]
Subject: Re: Hints for 64bitall (PPC!) Darwin perl
From: Dominic Dunlop <domo@computer.org>
Message-Id: <1D31D9A6-2451-49EE-AD80-80F1D9CA2825@computer.org>
Date: Mon, 27 Jun 2005 19:46:59 +0200
[ 25228]
Use the correct gcc when more than one gcc is installed
Thanks to Campo
[ 25231]
Subject: Re: [PATCH] Tru64: use -c99 for ccflags if available
From: Jarkko Hietaniemi <jhietaniemi@gmail.com>
Date: Thu, 28 Jul 2005 10:01:51 +0300
Message-ID: <42E882DF.6020100@gmail.com>
Message-ID: <42E86DE9.6090709@gmail.com>
[ 25282]
Subject: [PATCH] Re: [perl #36235] perl + gcc-4.0.0 + solaris + gnu binutils
From: Andy Dougherty <doughera@lafayette.edu>
Date: Tue, 26 Jul 2005 12:03:37 -0400 (EDT)
Message-ID: <Pine.SOC.4.62.0507261131300.8774@maxwell.phys.lafayette.edu>
[ 25305]
Subject: make test of perl 5.8.7 failed on icc9
From: YAMASHINA Hio <hio@ymir.co.jp>
Date: Thu, 18 Aug 2005 20:36:57 +0900
Message-Id: <20050818165213.BDF1.HIO@ymir.co.jp>
[ 25402]
Subject: [perl #36448] configuring ranlib for perl on osx with xcode 2.1
From: Luke Closs (via RT) <perlbug-followup@perl.org>
Message-ID: <rt-3.0.11-36448-116486.6.06308221656583@perl.org>
Date: 1 Jul 2005 21:56:31 -0000
[ 25403]
Add Luke Closs to AUTHORS
p4raw-link: @25403 on //depot/perl: 4807e77148ae5b2c2e75a9f0a331a965ec53c794
p4raw-link: @25402 on //depot/perl: e39a9d84ad1bc6fb197298c9cc46327914add09c
p4raw-link: @25305 on //depot/perl: 87d05bbec54b321e0c8f1c900a4ea893850fb17f
p4raw-link: @25282 on //depot/perl: 002c7b694395003db50bd9ad796f4b9ec7e0973f
p4raw-link: @25231 on //depot/perl: be73ebb05b9eec2e7d6c15246ec01b902895aaa1
p4raw-link: @25228 on //depot/perl: d3c62e8b294a3a45a5d44ea83433c15b6a39a198
p4raw-link: @25004 on //depot/perl: 381aa1c34573c3084d65a3f45ffcdc24a58d6a53
p4raw-link: @24981 on //depot/perl: bc961b003e8925ea1668627dcdfb26c75212b4c6
p4raw-link: @24674 on //depot/perl: 110d3f988f2faab8121f358ba4237db2528fb801
p4raw-link: @24667 on //depot/perl: ebf89b737691c72314d768f6a0746c119986eac8
p4raw-link: @24644 on //depot/perl: 8b7d8421acfa75c6cba0f3a12f068c4c4766abeb
p4raw-link: @24630 on //depot/perl: b951dd56557958e31c158a64dc318a83e01f429b
p4raw-link: @24628 on //depot/perl: b6f9b0977d2f8615c1eb6c4b3790ac841e30b81f
p4raw-link: @24627 on //depot/perl: 3c0f78ca4f737d7b40beecbfdca31b9f7e3fb952
p4raw-link: @24588 on //depot/perl: 42a116590b56a49035a440a6b0f3a679f91e9375
p4raw-link: @24539 on //depot/perl: 2a9d46aca4fcc38a37d117c400a7d318e3e521b7on //depot/metaconfig: 2482d9e4fb5d7ef958b118f90a41c8e9bf8833d6
p4raw-link: @24461 on //depot/perl: 53f5e3f038d2d502e113c7533e1aa8213a6bda1c
p4raw-link: @24444 on //depot/perl: 24801a4b9a14a56208916a537c4c237993c25186
p4raw-id: //depot/maint-5.8/perl@25470
p4raw-integrated: from //depot/perl@25469 'copy in' x2p/a2py.c
(@19242..) cygwin/perlld.in (@21783..) hints/aix.sh (@23952..)
hints/linux.sh (@24075..) hints/hpux.sh (@24107..) AUTHORS
(@25085..) 'edit in' Configure (@25387..)
p4raw-integrated: from //depot/perl@25231 'edit in' handy.h (@25196..)
p4raw-integrated: from //depot/perl@24981 'edit in' hints/darwin.sh
(@24446..)
p4raw-integrated: from //depot/perl@24667 'edit in' perl.c (@24666..)
p4raw-integrated: from //depot/perl@24628 'merge in' perlapi.h
(@24574..)
p4raw-integrated: from //depot/perl@24627 'copy in'
ext/DynaLoader/dl_dlopen.xs (@12627..) 'merge in' embed.pl
(@24492..) sv.c (@24625..)
p4raw-integrated: from //depot/perl@24588 'copy in' cflags.SH
(@17945..)
p4raw-integrated: from //depot/perl@24539 'ignore' hints/solaris_2.sh
(@23750..)
p4raw-integrated: from //depot/perl@24444 'edit in' perl.h (@24421..)
'ignore' hints/dec_osf.sh (@23864..) 'merge in' toke.c
(@24440..)
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 23 |
1 files changed, 20 insertions, 3 deletions
@@ -120,6 +120,15 @@ int yyactlevel = -1; #endif #define CLINE (PL_copline = (CopLINE(PL_curcop) < PL_copline ? CopLINE(PL_curcop) : PL_copline)) +/* According to some strict interpretations of ANSI C89 one cannot + * cast void pointers to code pointers or vice versa (as filter_add(), + * filter_del(), and filter_read() will want to do). We should still + * be able to use a union for sneaky "casting". */ +typedef union { + XPVIO* iop; + filter_t filter; +} xpvio_filter_u; + /* * Convenience functions to return different tokens and prime the * lexer for the next token. They all take an argument. @@ -2117,6 +2126,8 @@ S_incl_perldb(pTHX) SV * Perl_filter_add(pTHX_ filter_t funcp, SV *datasv) { + xpvio_filter_u u; + if (!funcp) return Nullsv; @@ -2126,7 +2137,8 @@ Perl_filter_add(pTHX_ filter_t funcp, SV *datasv) datasv = NEWSV(255,0); if (!SvUPGRADE(datasv, SVt_PVIO)) Perl_die(aTHX_ "Can't upgrade filter_add data to SVt_PVIO"); - IoANY(datasv) = (void *)funcp; /* stash funcp into spare field */ + u.filter = funcp; + IoANY(datasv) = u.iop; /* stash funcp into spare field */ IoFLAGS(datasv) |= IOf_FAKE_DIRP; DEBUG_P(PerlIO_printf(Perl_debug_log, "filter_add func %p (%s)\n", (void*)funcp, SvPV_nolen(datasv))); @@ -2141,12 +2153,15 @@ void Perl_filter_del(pTHX_ filter_t funcp) { SV *datasv; + xpvio_filter_u u; + DEBUG_P(PerlIO_printf(Perl_debug_log, "filter_del func %p", (void*)funcp)); if (!PL_rsfp_filters || AvFILLp(PL_rsfp_filters)<0) return; /* if filter is on top of stack (usual case) just pop it off */ datasv = FILTER_DATA(AvFILLp(PL_rsfp_filters)); - if (IoANY(datasv) == (void *)funcp) { + u.iop = IoANY(datasv); + if (u.filter == funcp) { IoFLAGS(datasv) &= ~IOf_FAKE_DIRP; IoANY(datasv) = (void *)NULL; sv_free(av_pop(PL_rsfp_filters)); @@ -2165,6 +2180,7 @@ Perl_filter_read(pTHX_ int idx, SV *buf_sv, int maxlen) { filter_t funcp; SV *datasv = NULL; + xpvio_filter_u u; if (!PL_rsfp_filters) return -1; @@ -2206,7 +2222,8 @@ Perl_filter_read(pTHX_ int idx, SV *buf_sv, int maxlen) return FILTER_READ(idx+1, buf_sv, maxlen); /* recurse */ } /* Get function pointer hidden within datasv */ - funcp = (filter_t)IoANY(datasv); + u.iop = IoANY(datasv); + funcp = u.filter; DEBUG_P(PerlIO_printf(Perl_debug_log, "filter_read %d: via function %p (%s)\n", idx, (void*)funcp, SvPV_nolen(datasv))); |