From: Marcus Holland-Moritz Date: Sun, 21 May 2006 22:34:29 +0000 (+0000) Subject: Remove duplicate documentation for SvREFCNT_inc(). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e638c62455531365fde53d9d25a44d20ac62f598;p=p5sagit%2Fp5-mst-13.2.git Remove duplicate documentation for SvREFCNT_inc(). Add documentation for SvREFCNT_inc_simple_void_NN(). Wrap SvREFCNT_inc_simple_void() in STMT_START/STMT_END. p4raw-id: //depot/perl@28266 --- diff --git a/sv.h b/sv.h index f89df26..fe92bc3 100644 --- a/sv.h +++ b/sv.h @@ -182,8 +182,11 @@ and smaller. Same as SvREFCNT_inc_simple, but can only be used if you don't need the return value. The macro doesn't need to return a meaningful value. -=for apidoc Am|SV*|SvREFCNT_inc|SV* sv -Increments the reference count of the given SV. +=for apidoc Am|SV*|SvREFCNT_inc_simple_void_NN|SV* sv +Same as SvREFCNT_inc, but can only be used if you don't need the return +value, and you know that I is not NULL. The macro doesn't need +to return a meaningful value, or check for NULLness, so it's smaller +and faster. =for apidoc Am|void|SvREFCNT_dec|SV* sv Decrements the reference count of the given SV. @@ -240,7 +243,7 @@ perform the upgrade if necessary. See C. #endif /* These guys don't need the curly blocks */ -#define SvREFCNT_inc_simple_void(sv) if (sv) (SvREFCNT(sv)++); +#define SvREFCNT_inc_simple_void(sv) STMT_START { if (sv) SvREFCNT(sv)++; } STMT_END #define SvREFCNT_inc_simple_NN(sv) (++(SvREFCNT(sv)),(SV*)(sv)) #define SvREFCNT_inc_void_NN(sv) (void)(++SvREFCNT((SV*)(sv))) #define SvREFCNT_inc_simple_void_NN(sv) (void)(++SvREFCNT((SV*)(sv)))