summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorDagfinn Ilmari Mannsåker <ilmari@ilmari.org>2017-06-02 10:45:32 +0100
committerDagfinn Ilmari Mannsåker <ilmari@ilmari.org>2017-06-05 16:06:41 +0100
commit8d37cdf70ae3493748b437390a3fa07a01fd07a9 (patch)
tree1ebd1f95c1c6648edfe6ee0e118c61c7fd54d2fc /mg.c
parentc6e25b0912953f93b48695f7e584ade418189d1d (diff)
downloadperl-8d37cdf70ae3493748b437390a3fa07a01fd07a9.tar.gz
Fix inconsistent whitespace in mg.c
A handful of assignments are lacking a space on the left-hand side, which is not consistent with the rest of the project style (perlstyle mandates «Space around most operators»). Also, a comment was mis-aligned.
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/mg.c b/mg.c
index 99c7aa2c14..90918af90a 100644
--- a/mg.c
+++ b/mg.c
@@ -638,7 +638,7 @@ Perl_magic_regdata_cnt(pTHX_ SV *sv, MAGIC *mg)
if (PL_curpm) {
REGEXP * const rx = PM_GETRE(PL_curpm);
if (rx) {
- UV uv= (UV)mg->mg_obj;
+ UV uv = (UV)mg->mg_obj;
if (uv == '+') { /* @+ */
/* return the number possible */
return RX_NPARENS(rx);
@@ -674,7 +674,7 @@ Perl_magic_regdatum_get(pTHX_ SV *sv, MAGIC *mg)
if (PL_curpm) {
REGEXP * const rx = PM_GETRE(PL_curpm);
if (rx) {
- const UV uv= (UV)mg->mg_obj;
+ const UV uv = (UV)mg->mg_obj;
/* @{^CAPTURE} does not contain $&, so we need to increment by 1 */
const I32 paren = mg->mg_len
+ (uv == '\003' ? 1 : 0);
@@ -2915,10 +2915,10 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
break;
case '/':
{
- SV *tmpsv= sv;
+ SV *tmpsv = sv;
if (SvROK(sv)) {
- SV *referent= SvRV(sv);
- const char *reftype= sv_reftype(referent, 0);
+ SV *referent = SvRV(sv);
+ const char *reftype = sv_reftype(referent, 0);
/* XXX: dodgy type check: This leaves me feeling dirty, but
* the alternative is to copy pretty much the entire
* sv_reftype() into this routine, or to do a full string
@@ -2927,9 +2927,9 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
* without reviewing the corresponding comment in
* sv_reftype(). - Yves */
if (reftype[0] == 'S' || reftype[0] == 'L') {
- IV val= SvIV(referent);
+ IV val = SvIV(referent);
if (val <= 0) {
- tmpsv= &PL_sv_undef;
+ tmpsv = &PL_sv_undef;
Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED),
"Setting $/ to a reference to %s as a form of slurp is deprecated, treating as undef. This will be fatal in Perl 5.28",
SvIV(SvRV(sv)) < 0 ? "a negative integer" : "zero"
@@ -2937,7 +2937,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
}
} else {
sv_setsv(sv, PL_rs);
- /* diag_listed_as: Setting $/ to %s reference is forbidden */
+ /* diag_listed_as: Setting $/ to %s reference is forbidden */
Perl_croak(aTHX_ "Setting $/ to a%s %s reference is forbidden",
*reftype == 'A' ? "n" : "", reftype);
}