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

Re: [PATCH 5.7.2] Allow for long long in h2xs

Thread Previous | Thread Next
From:
Jarkko Hietaniemi
Date:
July 31, 2001 12:14
Subject:
Re: [PATCH 5.7.2] Allow for long long in h2xs
Message ID:
20010731141402.T120@chaos.wustl.edu
On Tue, Jul 31, 2001 at 03:04:03PM -0400, Ilya Zakharevich wrote:
> On Tue, Jul 31, 2001 at 10:11:57AM -0500, Jarkko Hietaniemi wrote:
> > > --- ./utils/h2xs.PL.orig	Thu Feb 22 18:57:58 2001
> > > +++ ./utils/h2xs.PL	Tue Jul 31 02:28:24 2001
> > > @@ -1648,6 +1508,7 @@ sub assign_typemap_entry {
> > >      print "Type mutation via typedefs: $otype ==> $type\n" if $opt_d;
> > >      $entry = assign_typemap_entry($type);
> > >    }
> > > +  return "T_NV" if $type =~ /^(unsigned\s+)?long\s+(long|double)\z/;
> > 
> > Hmmm.  If our IVs are long longs T_NV is evil and unnecessary integer
> > to floating point casting.
> 
> As I said, it is better than *NOTHING*.  A better solution would be to
> have a separate typemap entry which switches on #if
> LONG_LONG_FITS_IN_IV, but I have suspicions one can't put #if inside a
> typemap entry...

I believe all the necessary information is in %Config: what size
in bytes are each of our types, and what are our types, both
"external" (such as long) and "internal" (such as IV).

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

Thread Previous | Thread Next


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