Skip to content
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

Define PERL_ARGS_ASSERT_CROAK_XS_USAGE when setting croak_xs_usage #196

Merged
merged 1 commit into from
Sep 30, 2020
Merged
Changes from all commits
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
8 changes: 3 additions & 5 deletions parts/inc/mess
Original file line number Diff line number Diff line change
Expand Up @@ -200,19 +200,16 @@ mess_sv(pTHX_ SV *basemsg, bool consume)

#ifndef croak_xs_usage
#if { NEED croak_xs_usage }

#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)

void
croak_xs_usage(const CV *const cv, const char *const params)
{
dTHX;
const GV *const gv = CvGV(cv);

#ifdef PERL_ARGS_ASSERT_CROAK_XS_USAGE
PERL_ARGS_ASSERT_CROAK_XS_USAGE;
#else
assert(cv); assert(params);
#endif

if (gv) {
const char *const gvname = GvNAME(gv);
Expand All @@ -230,6 +227,7 @@ croak_xs_usage(const CV *const cv, const char *const params)
}
#endif
#endif
#endif

=xsinit

Expand Down