SHA256
1
0
forked from pool/perl

- fix constant print issue [bnc#621856]

- fix h2ph so that _h2ph_pre.ph doesn't lead to warnings
- do not add vendorlib/auto to filelist [bnc#624628]

OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl?expand=0&rev=41
This commit is contained in:
2010-07-29 07:46:22 +00:00
committed by Git OBS Bridge
parent 1b27e044bf
commit 2258119af3
5 changed files with 84 additions and 1 deletions

20
perl-constprint.diff Normal file
View File

@@ -0,0 +1,20 @@
--- ./gv.c.orig 2010-05-13 22:01:07.000000000 +0000
+++ ./gv.c 2010-07-28 09:57:06.000000000 +0000
@@ -250,8 +250,16 @@ Perl_gv_init(pTHX_ GV *gv, HV *stash, co
if (doproto) { /* Replicate part of newSUB here. */
ENTER;
if (has_constant) {
+ char *name0 = NULL;
+ if (name[len]) {
+ /* newCONSTSUB doesn't take a len arg, so make sure w
+ * give it a \0-terminated string */
+ name0 = savepvn(name, len);
+ }
/* newCONSTSUB takes ownership of the reference from us. */
- GvCV(gv) = newCONSTSUB(stash, name, has_constant);
+ GvCV(gv) = newCONSTSUB(stash, (name0 ? name0 : name), has_constant);
+ if (name0)
+ Safefree(name0);
/* If this reference was a copy of another, then the subroutine
must have been "imported", by a Perl space assignment to a GV
from a reference to CV. */