stas 2003/09/22 16:46:19
Modified: src/modules/perl modperl_util.c modperl_util.h Log: not sure where the modperl_apr_table_dump function belongs, add it to utils for now so it won't get lost Revision Changes Path 1.54 +21 -0 modperl-2.0/src/modules/perl/modperl_util.c Index: modperl_util.c =================================================================== RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -u -r1.53 -r1.54 --- modperl_util.c 18 Sep 2003 07:44:24 -0000 1.53 +++ modperl_util.c 22 Sep 2003 23:46:19 -0000 1.54 @@ -734,3 +734,24 @@ return newRV_noinc(sv); } + +#ifdef MP_TRACE +/* XXX: internal debug function */ +/* any non-false value for MOD_PERL_TRACE/PerlTrace enables this function */ +void modperl_apr_table_dump(pTHX_ apr_table_t *table, char *name) +{ + int i; + const apr_array_header_t *array; + apr_table_entry_t *elts; + + array = apr_table_elts(table); + elts = (apr_table_entry_t *)array->elts; + modperl_trace(MP_FUNC, "Contents of table %s", name); + for (i = 0; i < array->nelts; i++) { + if (!elts[i].key || !elts[i].val) { + continue; + } + modperl_trace(MP_FUNC, "%s => %s", elts[i].key, elts[i].val); + } +} +#endif 1.48 +4 -0 modperl-2.0/src/modules/perl/modperl_util.h Index: modperl_util.h =================================================================== RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.h,v retrieving revision 1.47 retrieving revision 1.48 diff -u -u -r1.47 -r1.48 --- modperl_util.h 18 Sep 2003 07:44:24 -0000 1.47 +++ modperl_util.h 22 Sep 2003 23:46:19 -0000 1.48 @@ -155,4 +155,8 @@ void modperl_clear_symtab(pTHX_ HV *symtab); +#ifdef MP_TRACE +void modperl_apr_table_dump(pTHX_ apr_table_t *table, char *name); +#endif + #endif /* MODPERL_UTIL_H */