diff options
author | Yves Orton <demerphq@gmail.com> | 2017-11-15 22:26:48 +0100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2017-11-16 17:58:01 +0100 |
commit | dbb571062f3e35020abd3df7d9439ad7a40cd560 (patch) | |
tree | b34714cc26c667acc1c4580b8d4f269965b51974 /handy.h | |
parent | c7be253fdfd98c3c7a091c34b43f3f16b4f9af0d (diff) | |
download | perl-dbb571062f3e35020abd3df7d9439ad7a40cd560.tar.gz |
handy.h: add a comment about perl_assert_ptr()
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2448,6 +2448,9 @@ void Perl_mem_log_del_sv(const SV *sv, const char *filename, const int linenumbe #define Safefree(d) safefree(MEM_LOG_FREE((Malloc_t)(d))) #endif +/* assert that a valid ptr has been supplied - use this instead of assert(ptr) * + * as it handles cases like constant string arguments without throwing warnings * + * the cast is required, as is the inequality check, to avoid warnings */ #define perl_assert_ptr(p) assert( ((void*)(p)) != 0 ) |