From 8993116eec9b213a86a1b4d1defa94830a106818 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Thu, 25 Mar 2010 19:39:07 +0000 Subject: [PATCH] perl: Fix $h->value_value method when returning an empty value. Previously this didn't correctly return an empty registry value. In this case the length argument to newSVpv would be 0 which tells Perl to try to calculate the length (we want newSVpvn instead). --- generator/generator.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/generator.ml b/generator/generator.ml index 230b66b..96d198d 100755 --- a/generator/generator.ml +++ b/generator/generator.ml @@ -2439,7 +2439,7 @@ DESTROY (h) name; pr " EXTEND (SP, 2);\n"; pr " PUSHs (sv_2mortal (newSViv (type)));\n"; - pr " PUSHs (sv_2mortal (newSVpv (r, len)));\n"; + pr " PUSHs (sv_2mortal (newSVpvn (r, len)));\n"; pr " free (r);\n"; | RInt64 -> -- 1.8.3.1