httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/lib apr_pools.c
Date Sat, 08 Jul 2000 11:57:16 GMT
gstein      00/07/08 04:57:15

  Modified:    src/lib/apr/include apr_pools.h
               src/lib/apr/lib apr_pools.c
  Log:
  const-ify the cleanup functions
  remove some useless "struct" keywords in apr_pools.h
  
  Revision  Changes    Path
  1.24      +17 -14    apache-2.0/src/lib/apr/include/apr_pools.h
  
  Index: apr_pools.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_pools.h,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- apr_pools.h	2000/07/07 02:45:19	1.23
  +++ apr_pools.h	2000/07/08 11:57:15	1.24
  @@ -180,7 +180,7 @@
   
   =cut
    */
  -APR_EXPORT(void) ap_clear_pool(struct ap_pool_t *p);
  +APR_EXPORT(void) ap_clear_pool(ap_pool_t *p);
   
   /*
   
  @@ -194,7 +194,7 @@
   
   =cut
    */
  -APR_EXPORT(void) ap_destroy_pool(struct ap_pool_t *p);
  +APR_EXPORT(void) ap_destroy_pool(ap_pool_t *p);
   
   /*
   
  @@ -248,7 +248,7 @@
   
   =cut
    */
  -APR_EXPORT(void *) ap_palloc(struct ap_pool_t *c, ap_size_t reqsize);
  +APR_EXPORT(void *) ap_palloc(ap_pool_t *c, ap_size_t reqsize);
   
   /*
   
  @@ -262,7 +262,7 @@
   
   =cut
    */
  -APR_EXPORT(void *) ap_pcalloc(struct ap_pool_t *p, ap_size_t size);
  +APR_EXPORT(void *) ap_pcalloc(ap_pool_t *p, ap_size_t size);
   
   /*
   
  @@ -276,7 +276,7 @@
   
   =cut
    */
  -APR_EXPORT(char *) ap_pstrdup(struct ap_pool_t *p, const char *s);
  +APR_EXPORT(char *) ap_pstrdup(ap_pool_t *p, const char *s);
   
   /*
   
  @@ -291,7 +291,7 @@
   
   =cut
    */
  -APR_EXPORT(char *) ap_pstrndup(struct ap_pool_t *p, const char *s, ap_size_t n);
  +APR_EXPORT(char *) ap_pstrndup(ap_pool_t *p, const char *s, ap_size_t n);
   
   /*
   
  @@ -305,7 +305,7 @@
   
   =cut
    */
  -APR_EXPORT_NONSTD(char *) ap_pstrcat(struct ap_pool_t *p, ...);
  +APR_EXPORT_NONSTD(char *) ap_pstrcat(ap_pool_t *p, ...);
   
   /*
   
  @@ -320,7 +320,7 @@
   
   =cut
    */
  -APR_EXPORT(char *) ap_pvsprintf(struct ap_pool_t *p, const char *fmt, va_list ap);
  +APR_EXPORT(char *) ap_pvsprintf(ap_pool_t *p, const char *fmt, va_list ap);
   
   /*
   
  @@ -335,11 +335,13 @@
   
   =cut
    */
  -APR_EXPORT_NONSTD(char *) ap_psprintf(struct ap_pool_t *p, const char *fmt, ...);
  +APR_EXPORT_NONSTD(char *) ap_psprintf(ap_pool_t *p, const char *fmt, ...);
   
   /*
   
  -=head1 void ap_register_cleanup(ap_pool_t *p, void *data, ap_status_t (*plain_cleanup(void
*), ap_status_t (*child_cleanup)(void *))
  +=head1 void ap_register_cleanup(ap_pool_t *p, const void *data,
  +                                ap_status_t (*plain_cleanup)(void *),
  +                                ap_status_t (*child_cleanup)(void *))
   
   B<Register a function to be called when a pool is cleared or destroyed>
   
  @@ -350,13 +352,14 @@
   
   =cut
    */
  -APR_EXPORT(void) ap_register_cleanup(struct ap_pool_t *p, void *data,
  +APR_EXPORT(void) ap_register_cleanup(ap_pool_t *p, const void *data,
                                        ap_status_t (*plain_cleanup) (void *),
                                        ap_status_t (*child_cleanup) (void *));
   
   /*
   
  -=head1 void ap_kill_cleanup(ap_pool_t *p, void *data, ap_status_t (*cleanup(void *))
  +=head1 void ap_kill_cleanup(ap_pool_t *p, const void *data,
  +                            ap_status_t (*cleanup(void *))
   
   B<remove a previously registered cleanup function>
   
  @@ -366,7 +369,7 @@
   
   =cut
    */
  -APR_EXPORT(void) ap_kill_cleanup(struct ap_pool_t *p, void *data,
  +APR_EXPORT(void) ap_kill_cleanup(ap_pool_t *p, const void *data,
                                    ap_status_t (*cleanup) (void *));
   
   /*
  @@ -381,7 +384,7 @@
   
   =cut
    */
  -APR_EXPORT(ap_status_t) ap_run_cleanup(struct ap_pool_t *p, void *data,
  +APR_EXPORT(ap_status_t) ap_run_cleanup(ap_pool_t *p, void *data,
                                          ap_status_t (*cleanup) (void *));
   
   /*
  
  
  
  1.63      +7 -7      apache-2.0/src/lib/apr/lib/apr_pools.c
  
  Index: apr_pools.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/lib/apr_pools.c,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- apr_pools.c	2000/07/07 02:45:19	1.62
  +++ apr_pools.c	2000/07/08 11:57:15	1.63
  @@ -530,13 +530,13 @@
    */
   
   struct cleanup {
  -    void *data;
  +    const void *data;
       ap_status_t (*plain_cleanup) (void *);
       ap_status_t (*child_cleanup) (void *);
       struct cleanup *next;
   };
   
  -APR_EXPORT(void) ap_register_cleanup(ap_pool_t *p, void *data,
  +APR_EXPORT(void) ap_register_cleanup(ap_pool_t *p, const void *data,
   				      ap_status_t (*plain_cleanup) (void *),
   				      ap_status_t (*child_cleanup) (void *))
   {
  @@ -552,8 +552,8 @@
       }
   }
   
  -APR_EXPORT(void) ap_kill_cleanup(ap_pool_t *p, void *data,
  -				  ap_status_t (*cleanup) (void *))
  +APR_EXPORT(void) ap_kill_cleanup(ap_pool_t *p, const void *data,
  +                                 ap_status_t (*cleanup) (void *))
   {
       struct cleanup *c;
       struct cleanup **lastp;
  @@ -574,7 +574,7 @@
   }
   
   APR_EXPORT(ap_status_t) ap_run_cleanup(ap_pool_t *p, void *data,
  -				 ap_status_t (*cleanup) (void *))
  +                                       ap_status_t (*cleanup) (void *))
   {
       ap_kill_cleanup(p, data, cleanup);
       return (*cleanup) (data);
  @@ -583,7 +583,7 @@
   static void run_cleanups(struct cleanup *c)
   {
       while (c) {
  -	(*c->plain_cleanup) (c->data);
  +	(*c->plain_cleanup) ((void *)c->data);
   	c = c->next;
       }
   }
  @@ -591,7 +591,7 @@
   static void run_child_cleanups(struct cleanup *c)
   {
       while (c) {
  -	(*c->child_cleanup) (c->data);
  +	(*c->child_cleanup) ((void *)c->data);
   	c = c->next;
       }
   }
  
  
  

Mime
View raw message