Hi Geoff, On Tuesday 09 October 2007 19:19, Geoffrey Young wrote: > if you're really confused, see the commits when I added Apache::MPM > > http://marc.info/?l=apache-modperl-cvs&m=106978727408877&w=2 > http://marc.info/?l=apache-modperl-cvs&m=106978912311523&w=2 > > the bulk of the main commit consists of the tests, but the interesting > changes are at the bottom. if you just follow that pattern you should > be able to add the module of your choice.
I think I did it. Please have a look at the attached patch to see if it is all that is needed to be done. The patch is a bit edited to suppress other changes in xs/. So I don't think it would apply to trunk without warnings. Thanks, Torsten
Index: xs/maps/modperl_structures.map =================================================================== --- xs/maps/modperl_structures.map (revision 0) +++ xs/maps/modperl_structures.map (revision 0) @@ -0,0 +1,14 @@ +########## ModPerl structures ########## + +# for mapping see %ModPerl::MapUtil::disabled_map in +# lib/ModPerl/MapUtil.pm + +<modperl_interp_t> +< mip +< perl +< num_requests +< flags +- ccfg +< refcnt +- tid +</modperl_interp_t> Index: xs/maps/modperl_types.map =================================================================== --- xs/maps/modperl_types.map (revision 583468) +++ xs/maps/modperl_types.map (working copy) @@ -1,6 +1,9 @@ ########## mod_perl types ########## struct modperl_filter_t | Apache2::OutputFilter +struct modperl_interp_t | ModPerl::Interpreter +modperl_interp_pool_t * | IV +PerlInterpreter * | IV ########## Perl types ########## Index: xs/maps/modperl_functions.map =================================================================== --- xs/maps/modperl_functions.map (revision 583468) +++ xs/maps/modperl_functions.map (working copy) @@ -162,3 +164,6 @@ MODULE=Apache2::Access PACKAGE=guess mpxs_Apache2__RequestRec_allow_override_opts + +MODULE=ModPerl::Interpreter + mpxs_ModPerl__Interpreter_current Index: xs/ModPerl/Interpreter/ModPerl__Interpreter.h =================================================================== --- xs/ModPerl/Interpreter/ModPerl__Interpreter.h (revision 0) +++ xs/ModPerl/Interpreter/ModPerl__Interpreter.h (revision 0) @@ -0,0 +1,21 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +static MP_INLINE +modperl_interp_t *mpxs_ModPerl__Interpreter_current(pTHX) +{ + return MP_THX_INTERP_GET(aTHX); +} Index: xs/tables/current/ModPerl/FunctionTable.pm =================================================================== --- xs/tables/current/ModPerl/FunctionTable.pm (revision 583468) +++ xs/tables/current/ModPerl/FunctionTable.pm (working copy) @@ -8199,6 +8237,20 @@ 'name' => 'func' } ] + }, + { + 'return_type' => 'modperl_interp_t *', + 'name' => 'mpxs_ModPerl__Interpreter_current', + 'attr' => [ + 'static', + '__inline__' + ], + 'args' => [ + { + 'type' => 'PerlInterpreter *', + 'name' => 'my_perl' + } + ] } ]; Index: xs/tables/current/Apache2/StructureTable.pm =================================================================== --- xs/tables/current/Apache2/StructureTable.pm (revision 583468) +++ xs/tables/current/Apache2/StructureTable.pm (working copy) @@ -3333,6 +3333,39 @@ 'name' => 'suexec_enabled' } ] + }, + { + 'type' => 'modperl_interp_t', + 'elts' => [ + { + 'type' => 'modperl_interp_pool_t *', + 'name' => 'mip' + }, + { + 'type' => 'PerlInterpreter *', + 'name' => 'perl' + }, + { + 'type' => 'int', + 'name' => 'num_requests' + }, + { + 'type' => 'U8', + 'name' => 'flags' + }, + { + 'type' => 'modperl_config_con_t *', + 'name' => 'ccfg' + }, + { + 'type' => 'int', + 'name' => 'refcnt' + }, + { + 'type' => 'unsigned long', + 'name' => 'tid' + } + ] } ];
pgpSUFdwupKhH.pgp
Description: PGP signature