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
Ilya Zakharevich
July 31, 2001 16:05
Re: [PATCH 5.7.2] Allow for long long in h2xs
Message ID:
On Tue, Jul 31, 2001 at 02:14:02PM -0500, Jarkko Hietaniemi wrote:
> > > 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).

The question is *when* we want this decision to be made.  We are
discussing h2xs, so it should be made independent of %Config (as
opposed to how xsubpp operates).

So NV is as good as it gets - unless we emit a custom typemap (which
h2xs does time to time anyway).  But even then we need the info about
integer sizes available when the corresponding chunks of C are
processed - so we need to use #if's, and we need a way to stuff #if's
into a typemap.

Hope this helps,

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About