perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: modperl-2.0/xs/APR/Table APR__Table.h
Date Wed, 19 Sep 2001 23:08:07 GMT
dougm       01/09/19 16:08:07

  Modified:    xs/APR/Table APR__Table.h
  Log:
  change APR::Table->do to use an apr_hash instead of apr_table for filtering
  Submitted by:	Philippe M . Chiasson <gozer@cpan.org>
  Reviewed by:	dougm
  
  Revision  Changes    Path
  1.3       +7 -5      modperl-2.0/xs/APR/Table/APR__Table.h
  
  Index: APR__Table.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/APR/Table/APR__Table.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- APR__Table.h	2001/09/15 18:21:48	1.2
  +++ APR__Table.h	2001/09/19 23:08:07	1.3
  @@ -1,6 +1,6 @@
   typedef struct {
       SV *cv;
  -    apr_table_t *filter; /*XXX: or maybe a mgv ? */
  +    apr_hash_t *filter;
       PerlInterpreter *perl;
   } mpxs_table_do_cb_data_t;
   
  @@ -21,7 +21,7 @@
   
       /* Skip entries if not in our filter list */
       if (tdata->filter) {
  -        if (!apr_table_get(tdata->filter, key)) {
  +        if (!apr_hash_get(tdata->filter, key, APR_HASH_KEY_STRING)) {
               return 1;
           }
       }
  @@ -62,12 +62,14 @@
   #endif
   
       if (items > 2) {
  +        char *filter_entry;
           STRLEN len;
  -        tdata.filter = apr_table_make(table->a.pool, items-2);
  +        
  +        tdata.filter = apr_hash_make(table->a.pool);
   
           while (MARK <= SP) {
  -            /* XXX: can we use apr_table_setn here? */
  -            apr_table_set(tdata.filter, SvPV(*MARK,len), "1");
  +            filter_entry = SvPV(*MARK, len);
  +            apr_hash_set(tdata.filter, filter_entry, len, "1");
               MARK++;
           }
       }
  
  
  

Mime
View raw message