]>
Commit | Line | Data |
---|---|---|
89e064d1 ER |
1 | Index: src/modules/perl/mod_perl.h |
2 | =================================================================== | |
3 | --- src/modules/perl/mod_perl.h (revision 607690) | |
4 | +++ src/modules/perl/mod_perl.h (working copy) | |
5 | @@ -141,7 +141,8 @@ | |
6 | /* betting on Perl*Handlers not using CvXSUBANY | |
7 | * mod_perl reuses this field for handler attributes | |
8 | */ | |
9 | -#define MP_CODE_ATTRS(cv) (CvXSUBANY((CV*)cv).any_i32) | |
10 | +U16 *mp_code_attrs(pTHX_ CV *cv); | |
11 | +#define MP_CODE_ATTRS(cv) (*mp_code_attrs(aTHX_ cv)) | |
12 | ||
13 | #define MgTypeExt(mg) (mg->mg_type == '~') | |
14 | ||
15 | Index: src/modules/perl/modperl_mgv.c | |
16 | =================================================================== | |
17 | --- src/modules/perl/modperl_mgv.c (revision 607694) | |
18 | +++ src/modules/perl/modperl_mgv.c (working copy) | |
19 | @@ -271,7 +271,7 @@ | |
20 | } | |
21 | else { | |
22 | if ((cv = get_cv(name, FALSE))) { | |
23 | - handler->attrs = (U32)MP_CODE_ATTRS(cv); | |
24 | + handler->attrs = MP_CODE_ATTRS(cv); | |
25 | handler->mgv_cv = | |
26 | modperl_mgv_compile(aTHX_ p, HvNAME(GvSTASH(CvGV(cv)))); | |
27 | modperl_mgv_append(aTHX_ p, handler->mgv_cv, GvNAME(CvGV(cv))); | |
28 | @@ -334,7 +334,7 @@ | |
29 | modperl_mgv_new_name(handler->mgv_obj, p, name); | |
30 | } | |
31 | ||
32 | - handler->attrs = (U32)MP_CODE_ATTRS(cv); | |
33 | + handler->attrs = MP_CODE_ATTRS(cv); | |
34 | /* note: this is the real function after @ISA lookup */ | |
35 | handler->mgv_cv = modperl_mgv_compile(aTHX_ p, HvNAME(GvSTASH(gv))); | |
36 | modperl_mgv_append(aTHX_ p, handler->mgv_cv, handler_name); | |
37 | Index: src/modules/perl/modperl_types.h | |
38 | =================================================================== | |
39 | --- src/modules/perl/modperl_types.h (revision 607690) | |
40 | +++ src/modules/perl/modperl_types.h (working copy) | |
41 | @@ -195,7 +195,7 @@ | |
42 | const char *name; | |
43 | CV *cv; | |
44 | U8 flags; | |
45 | - U32 attrs; | |
46 | + U16 attrs; | |
47 | modperl_handler_t *next; | |
48 | }; | |
49 | ||
50 | Index: src/modules/perl/modperl_util.c | |
51 | =================================================================== | |
52 | --- src/modules/perl/modperl_util.c (revision 607694) | |
53 | +++ src/modules/perl/modperl_util.c (working copy) | |
54 | Index: xs/Apache2/Filter/Apache2__Filter.h | |
55 | @@ -903,3 +903,13 @@ | |
56 | return retval ? SvREFCNT_inc(retval) : &PL_sv_undef; | |
57 | } | |
58 | ||
59 | +U16 *mp_code_attrs(pTHX_ CV *cv) { | |
60 | + MAGIC *mg; | |
61 | + | |
62 | + if (!SvMAGICAL(cv)) { | |
63 | + sv_magic((SV*)cv, Nullsv, PERL_MAGIC_ext, NULL, -1); | |
64 | + } | |
65 | + | |
66 | + mg = mg_find((SV*)cv, PERL_MAGIC_ext); | |
67 | + return &(mg->mg_private); | |
68 | +} | |
69 | =================================================================== | |
70 | --- xs/Apache2/Filter/Apache2__Filter.h (revision 607694) | |
71 | +++ xs/Apache2/Filter/Apache2__Filter.h (working copy) | |
72 | @@ -86,9 +86,9 @@ | |
73 | return len; | |
74 | } | |
75 | ||
76 | -static MP_INLINE U32 *modperl_filter_attributes(SV *package, SV *cvrv) | |
77 | +static MP_INLINE U16 *modperl_filter_attributes(pTHX_ SV *package, SV *cvrv) | |
78 | { | |
79 | - return (U32 *)&MP_CODE_ATTRS(SvRV(cvrv)); | |
80 | + return &MP_CODE_ATTRS(SvRV(cvrv)); | |
81 | } | |
82 | ||
83 | #ifdef MP_TRACE | |
84 | @@ -118,7 +118,7 @@ | |
85 | MP_STATIC XS(MPXS_modperl_filter_attributes) | |
86 | { | |
87 | dXSARGS; | |
88 | - U32 *attrs = modperl_filter_attributes(ST(0), ST(1)); | |
89 | + U16 *attrs = modperl_filter_attributes(aTHX_ ST(0), ST(1)); | |
90 | I32 i; | |
91 | #ifdef MP_TRACE | |
92 | HV *stash = gv_stashsv(ST(0), TRUE); | |
93 |