This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More efficient to call newSV_type() then SvGROW() instead of newSV()
[perl5.git]
/
toke.c
diff --git
a/toke.c
b/toke.c
index
7719aa5
..
5248d46
100644
(file)
--- a/
toke.c
+++ b/
toke.c
@@
-11149,8
+11149,8
@@
S_scan_heredoc(pTHX_ register char *s)
s--;
#endif
s--;
#endif
- tmpstr = newSV
(79
);
-
sv_upgrade(tmpstr, SVt_PVIV
);
+ tmpstr = newSV
_type(SVt_PVIV
);
+
SvGROW(tmpstr, 80
);
if (term == '\'') {
op_type = OP_CONST;
SvIV_set(tmpstr, -1);
if (term == '\'') {
op_type = OP_CONST;
SvIV_set(tmpstr, -1);
@@
-11555,8
+11555,8
@@
S_scan_str(pTHX_ char *start, int keep_quoted, int keep_delims)
/* create a new SV to hold the contents. 79 is the SV's initial length.
What a random number. */
/* create a new SV to hold the contents. 79 is the SV's initial length.
What a random number. */
- sv = newSV
(79
);
-
sv_upgrade(sv, SVt_PVIV
);
+ sv = newSV
_type(SVt_PVIV
);
+
SvGROW(sv, 80
);
SvIV_set(sv, termcode);
(void)SvPOK_only(sv); /* validate pointer */
SvIV_set(sv, termcode);
(void)SvPOK_only(sv); /* validate pointer */