summaryrefslogtreecommitdiff
path: root/gv.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2022-06-07 05:39:12 -0600
committerKarl Williamson <khw@cpan.org>2022-06-14 07:38:34 -0600
commit82943faa9f6f51aebb7960cc8eee73dd44c024e4 (patch)
treeb9e3841945cfbac528df7dfbbe9561d83a17102b /gv.h
parenta5d3a568eb8dce244c5f4f5f1e061ba5a36edbb8 (diff)
downloadperl-82943faa9f6f51aebb7960cc8eee73dd44c024e4.tar.gz
Convert '!!' to cBOOL()
I believe the '!!' is somewhat obscure; I for one didn't know about it for years of programming C, and it was buggy in one compiler, which is why cBOOL was created, I believe. And it is graphically dense, and generally harder to read than the cBOOL() construct. This commit dates from before we moved to C99 where we can simply cast to (bool), and cBOOL() has been rewritten to do that. But the vast majority of code uses cBOOL(), and this commit brings the remainder of the core .[ch] files into uniformity.
Diffstat (limited to 'gv.h')
-rw-r--r--gv.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gv.h b/gv.h
index f3dbaab57e..962825de65 100644
--- a/gv.h
+++ b/gv.h
@@ -269,7 +269,7 @@ Return the CV from the GV.
#define gv_fetchmethod(stash, name) gv_fetchmethod_autoload(stash, name, TRUE)
#define gv_fetchsv_nomg(n,f,t) gv_fetchsv(n,(f)|GV_NO_SVGMAGIC,t)
#define gv_init(gv,stash,name,len,multi) \
- gv_init_pvn(gv,stash,name,len,GV_ADDMULTI*!!(multi))
+ gv_init_pvn(gv,stash,name,len,GV_ADDMULTI*cBOOL(multi))
#define gv_fetchmeth(stash,name,len,level) gv_fetchmeth_pvn(stash, name, len, level, 0)
#define gv_fetchmeth_autoload(stash,name,len,level) gv_fetchmeth_pvn_autoload(stash, name, len, level, 0)
#define gv_fetchmethod_flags(stash,name,flags) gv_fetchmethod_pv_flags(stash, name, flags)
@@ -281,7 +281,7 @@ Equivalent to C<L</gv_autoload_pvn>>.
=cut
*/
#define gv_autoload4(stash, name, len, autoload) \
- gv_autoload_pvn(stash, name, len, !!(autoload))
+ gv_autoload_pvn(stash, name, len, cBOOL(autoload))
#define newGVgen(pack) newGVgen_flags(pack, 0)
#define gv_method_changed(gv) \
( \