Skip to content

Document assert_(), combine with __ASSERT_; fixup Perl_assert() #23543

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: blead
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions perl.h
Original file line number Diff line number Diff line change
Expand Up @@ -5102,8 +5102,6 @@ Gid_t getegid (void);
"\", line %d", STRINGIFY(what), __LINE__), \
(void) 0)), ((void)0))

/* assert() gets defined if DEBUGGING.
* If no DEBUGGING, the <assert.h> has not been included. */
#ifndef assert
# define assert(what) Perl_assert(what)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit perl.h: Remove obsolete comment

Hmm... this makes me confused.

The commit message states: assert() is always defined. But the very next line is #ifndef assert, i.e. if not defined assert.

So possibilities I can see:

  • the #ifndef assert is useless and can/should be removed
  • the statement in the commit message isn't 100% true

#endif
Expand Down