From d2b4c688cb5f38457c0fdf47af09359204b0926e Mon Sep 17 00:00:00 2001 From: Nicholas Clark <nick@ccl4.org> Date: Mon, 8 Nov 2010 09:13:27 +0000 Subject: In B.xs, refactor make_warnings_object() to take a COP * instead of STRLEN *. --- ext/B/B.xs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ext/B') diff --git a/ext/B/B.xs b/ext/B/B.xs index 9e995ef330..cfc05178f8 100644 --- a/ext/B/B.xs +++ b/ext/B/B.xs @@ -291,8 +291,9 @@ make_temp_object(pTHX_ SV *temp) } static SV * -make_warnings_object(pTHX_ STRLEN *warnings) +make_warnings_object(pTHX_ const COP *const cop) { + const STRLEN *const warnings = cop->cop_warnings; const char *type = 0; dMY_CXT; IV iv = sizeof(specialsv_list)/sizeof(SV*); @@ -1276,7 +1277,7 @@ COP_warnings(o) B::COP o PPCODE: #if PERL_VERSION >= 9 - ST(0) = make_warnings_object(aTHX_ o->cop_warnings); + ST(0) = make_warnings_object(aTHX_ o); #else ST(0) = make_sv_object(aTHX_ NULL, o->cop_warnings); #endif -- cgit v1.2.1