Skip to content

Commit 738ad2e

Browse files
committed
proto.h: Use __attribute__nonnull__ if available
proto.h contains a generated PERL_ARGS_ASSERT macro for every function. It asserts that each parameter that isn't allowed to be NULL actually isn't. These asserts are disabled when not DEBUGGING. But many compilers allow a compile-time assertion to be made for this situation, so we can add an extra measure of protection for free. And this gives hints to the compiler for optimizations when the asserts() aren't there. Because of complications, this commit only does this for functions that don't have a thread context.
1 parent 08d2e0e commit 738ad2e

File tree

2 files changed

+975
-245
lines changed

2 files changed

+975
-245
lines changed

0 commit comments

Comments
 (0)