summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2022-05-12 15:39:00 -0600
committerKarl Williamson <khw@cpan.org>2022-05-19 04:55:46 -0600
commitacd60c2b758b0abad1ebc7ba937eebb76ef23cb4 (patch)
treedc906e5c5c36143c807b3eed273bbb81808eb3ca /sv.h
parent4f06c0d52f50cb0d949c0bd4fc6f589b9d71bd82 (diff)
downloadperl-acd60c2b758b0abad1ebc7ba937eebb76ef23cb4.tar.gz
perlapi: Document SvAMAGIC
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sv.h b/sv.h
index 9759bd05e8..7b21e71241 100644
--- a/sv.h
+++ b/sv.h
@@ -1019,6 +1019,15 @@ Remove any string offset.
#define SvRMAGICAL_on(sv) (SvFLAGS(sv) |= SVs_RMG)
#define SvRMAGICAL_off(sv) (SvFLAGS(sv) &= ~SVs_RMG)
+/*
+=for apidoc Am|bool|SvAMAGIC|SV * sv
+
+Returns a boolean as to whether C<sv> has overloading (active magic) enabled or
+not.
+
+=cut
+*/
+
#define SvAMAGIC(sv) (SvROK(sv) && SvOBJECT(SvRV(sv)) && \
HvAMAGIC(SvSTASH(SvRV(sv))))