apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject cvs commit: apr/tables apr_tables.c
Date Sat, 13 Jul 2002 18:16:33 GMT
brianp      2002/07/13 11:16:33

  Modified:    modules/http http_protocol.c
               include  apr_tables.h
               tables   apr_tables.c
  Log:
  added apr_is_empty_array()
  
  Revision  Changes    Path
  1.445     +1 -1      httpd-2.0/modules/http/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/http/http_protocol.c,v
  retrieving revision 1.444
  retrieving revision 1.445
  diff -u -r1.444 -r1.445
  --- http_protocol.c	30 Jun 2002 03:46:56 -0000	1.444
  +++ http_protocol.c	13 Jul 2002 18:16:33 -0000	1.445
  @@ -1558,7 +1558,7 @@
                          r->content_encoding);
       }
   
  -    if (!apr_is_empty_table(r->content_languages)) {
  +    if (!apr_is_empty_array(r->content_languages)) {
           int i;
           char **languages = (char **)(r->content_languages->elts);
           for (i = 0; i < r->content_languages->nelts; ++i) {
  
  
  
  1.33      +7 -0      apr/include/apr_tables.h
  
  Index: apr_tables.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_tables.h,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- apr_tables.h	13 Jul 2002 07:08:41 -0000	1.32
  +++ apr_tables.h	13 Jul 2002 18:16:33 -0000	1.33
  @@ -135,6 +135,13 @@
   APR_DECLARE(int) apr_is_empty_table(const apr_table_t *t);
   
   /**
  + * Determine if the array is empty
  + * @param a The array to check
  + * @return True if empty, False otherwise
  + */
  +APR_DECLARE(int) apr_is_empty_array(const apr_array_header_t *a);
  +
  +/**
    * Create an array
    * @param p The pool to allocate the memory out of
    * @param nelts the number of elements in the initial array
  
  
  
  1.36      +5 -0      apr/tables/apr_tables.c
  
  Index: apr_tables.c
  ===================================================================
  RCS file: /home/cvs/apr/tables/apr_tables.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- apr_tables.c	13 Jul 2002 07:08:41 -0000	1.35
  +++ apr_tables.c	13 Jul 2002 18:16:33 -0000	1.36
  @@ -109,6 +109,11 @@
       res->nalloc = nelts;	/* ...but this many allocated */
   }
   
  +APR_DECLARE(int) apr_is_empty_array(const apr_array_header_t *a)
  +{
  +    return ((a == NULL) || (a->nelts == 0));
  +}
  +
   APR_DECLARE(apr_array_header_t *) apr_array_make(apr_pool_t *p,
   						int nelts, int elt_size)
   {
  
  
  

Mime
View raw message