develooper Front page | perl.perl5.porters | Postings from February 2001

Re: [PATCH] POSIX.xs

Thread Previous
From:
Jarkko Hietaniemi
Date:
February 3, 2001 08:48
Subject:
Re: [PATCH] POSIX.xs
Message ID:
20010203104751.B25183@chaos.wustl.edu
On Thu, Feb 01, 2001 at 04:19:22PM +1100, Brendan O'Dea wrote:
> I was getting test failures on linux-ia64 for lib/posix.t due to the
> mask pointer being trashed.  Using the same logic as typemap does to
> extract the pointer from the object works.

Thanks.  Your patch has been applied to both the maintenance and
the development branches of perl.

> diff -ur perl-5.6.0.orig/ext/POSIX/POSIX.xs perl-5.6.0/ext/POSIX/POSIX.xs
> --- perl-5.6.0.orig/ext/POSIX/POSIX.xs	Sun Feb 20 03:08:47 2000
> +++ perl-5.6.0/ext/POSIX/POSIX.xs	Thu Feb  1 15:49:50 2001
> @@ -3406,9 +3406,8 @@
>  		/* Set up any desired mask. */
>  		svp = hv_fetch(action, "MASK", 4, FALSE);
>  		if (svp && sv_isa(*svp, "POSIX::SigSet")) {
> -		    unsigned long tmp;
> -		    tmp = (unsigned long)SvNV((SV*)SvRV(*svp));
> -		    sigset = (sigset_t*) tmp;
> +		    IV tmp = SvIV((SV*)SvRV(*svp));
> +		    sigset =  INT2PTR(sigset_t*, tmp);
>  		    act.sa_mask = *sigset;
>  		}
>  		else
> 
> Regards,
> -- 
> Brendan O'Dea                                        bod@compusol.com.au
> Compusol Pty. Limited                  (NSW, Australia)  +61 2 9810 3633

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About