summaryrefslogtreecommitdiff
path: root/xsutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'xsutils.c')
-rw-r--r--xsutils.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/xsutils.c b/xsutils.c
index b4161b0d09..187d9f75c1 100644
--- a/xsutils.c
+++ b/xsutils.c
@@ -84,12 +84,30 @@ modify_SV_attributes(pTHXo_ SV *sv, SV **retlist, SV **attrlist, int numattrs)
continue;
}
break;
+ case 's':
+ if (strEQ(name, "shared")) {
+ if (negated)
+ GvSHARED_off(CvGV((CV*)sv));
+ else
+ GvSHARED_on(CvGV((CV*)sv));
+ continue;
+ }
+ break;
}
break;
}
break;
default:
- /* nothing, yet */
+ switch ((int)len) {
+ case 6:
+ switch (*name) {
+ case 's':
+ if (strEQ(name, "shared")) {
+ /* toke.c has already marked as GvSHARED */
+ continue;
+ }
+ }
+ }
break;
}
/* anything recognized had a 'continue' above */
@@ -168,6 +186,8 @@ usage:
#endif
if (cvflags & CVf_METHOD)
XPUSHs(sv_2mortal(newSVpvn("method", 6)));
+ if (GvSHARED(CvGV((CV*)sv)))
+ XPUSHs(sv_2mortal(newSVpvn("shared", 6)));
break;
default:
break;