develooper Front page | perl.perl5.porters | Postings from October 2012

Why are some length-type variables declared I32?

Thread Next
Karl Williamson
October 31, 2012 10:29
Why are some length-type variables declared I32?
Message ID:
For example,

Perl_my_bcopy(register const char *from,register char *to,register I32 len)

is supposed to be a drop-in replacement for bcopy(), but bcopy's len 
parameter on my Linux is size_t.

There is a report on IRC in which 5.14.2 Perl_savepvn() is being called 
with a negative <len>, after several hours of processing.

It seems to me that we should have asserts at least, as there is enough 
memory now available on some  machines so that you don't necessarily get 
an ENOMEM when fulfilling such a request

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