You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check the right caller context for 'illegalproto' warnings in attributes.xs
Previously the XS code always checked its immediate caller for warnings.
This was fine when core perl invokes it directly in a `:prototype`
warning, but was checking the wrong layer when invoked indirectly via
`attributes::import`. In that case, it meant that it was sensitive to,
and printed warnings as it coming from attributes.pm itself, rather than
the intended caller; i.e. the location of the `use attributes ...`
statement.
This is fixed by using `caller_cx()` to walk up the caller stack looking
for a call frame not from the `attributes` package.
0 commit comments