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 08:12
Subject:
Re: [PATCH 5.7.2] Allow for long long in h2xs
Message ID:
20010731101157.G120@chaos.wustl.edu
On Tue, Jul 31, 2001 at 05:39:09AM -0400, Ilya Zakharevich wrote:
> This support for long long is bastardized, but it is better than
> nothing.
> 
> Enjoy,
> Ilya
> 
> --- ./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.

>    $entry ||= $typemap{$otype}
>      || (td_is_struct($type) ? "T_OPAQUE_STRUCT" : "T_PTROBJ");
>    $typemap{$otype} = $entry;

-- 
$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