perl: use newSVpvn for variable length strings.
authorRichard Jones <rjones@redhat.com>
Thu, 25 Mar 2010 19:44:22 +0000 (19:44 +0000)
committerRichard Jones <rjones@redhat.com>
Thu, 25 Mar 2010 19:44:22 +0000 (19:44 +0000)
commit57c143da4d9b9e75e6da83ef3b8e8c0979c6f0f6
treef4459d61555fa98804a69391202f118dc71fc7a3
parent3e9d96d246f75bd7d2aa592b84bd6446687cad85
perl: use newSVpvn for variable length strings.

Previously we used newSVpv (str, len), but if len == 0 then
this means Perl tries to calculate the string length using
strlen(3).  This is not desirable when we know the length, in
which case we should use newSVpvn instead.
src/generator.ml