Accepting request 44156 from devel:languages:perl
checked in (request 44156) OBS-URL: https://build.opensuse.org/request/show/44156 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl?expand=0&rev=42
This commit is contained in:
committed by
Git OBS Bridge
parent
2258119af3
commit
61578a5df7
@@ -1,20 +0,0 @@
|
||||
--- ./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. */
|
Reference in New Issue
Block a user