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 Fri, 07 Jul 2000 02:45:20 GMT
gstein      00/07/06 19:45:20

  Modified:    src/lib/apr/include apr_pools.h
               src/lib/apr/lib apr_pools.c
  Log:
  use ap_size_t rather than "int" or "long"
  
  Revision  Changes    Path
  1.23      +16 -16    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.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- apr_pools.h	2000/07/05 20:52:29	1.22
  +++ apr_pools.h	2000/07/07 02:45:19	1.23
  @@ -110,8 +110,8 @@
   #ifndef POOL_DEBUG
   APR_EXPORT(ap_pool_t *) ap_find_pool(const void *ts);
   #else
  -APR_EXPORT(int) ap_pool_join(ap_pool_t *p, ap_pool_t *sub, int (apr_abort)(int retcode));
  -APR_EXPORT(ap_pool_t *) ap_find_pool(const void *ts, int (apr_abort)(int retcode));
  +APR_EXPORT(int) ap_pool_join(ap_pool_t *p, ap_pool_t *sub, int (*apr_abort)(int retcode));
  +APR_EXPORT(ap_pool_t *) ap_find_pool(const void *ts, int (*apr_abort)(int retcode));
   #endif /* POOL_DEBUG */
   
   #ifdef ULTRIX_BRAIN_DEATH
  @@ -198,7 +198,7 @@
   
   /*
   
  -=head1 long *ap_bytes_in_pool(ap_pool_t *p)
  +=head1 ap_size_t ap_bytes_in_pool(ap_pool_t *p)
   
   B<report the number of bytes currently in the pool>
   
  @@ -207,11 +207,11 @@
   
   =cut
    */
  -APR_EXPORT(long) ap_bytes_in_pool(ap_pool_t *p);
  +APR_EXPORT(ap_size_t) ap_bytes_in_pool(ap_pool_t *p);
   
   /*
   
  -=head1 long *ap_bytes_in_free_blocks(ap_pool_t *p)
  +=head1 ap_size_t ap_bytes_in_free_blocks(ap_pool_t *p)
   
   B<report the number of bytes currently in the list of free blocks>
   
  @@ -219,7 +219,7 @@
   
   =cut
    */
  -APR_EXPORT(long) ap_bytes_in_free_blocks(void);
  +APR_EXPORT(ap_size_t) ap_bytes_in_free_blocks(void);
   
   /*
   
  @@ -238,7 +238,7 @@
   
   /*
   
  -=head1 void *ap_palloc(ap_pool_t *c, int reqsize)
  +=head1 void *ap_palloc(ap_pool_t *c, ap_size_t reqsize)
   
   B<Allocate a block of memory from a pool>
   
  @@ -248,11 +248,11 @@
   
   =cut
    */
  -APR_EXPORT(void *) ap_palloc(struct ap_pool_t *c, int reqsize);
  +APR_EXPORT(void *) ap_palloc(struct ap_pool_t *c, ap_size_t reqsize);
   
   /*
   
  -=head1 void *ap_pcalloc(ap_pool_t *c, int reqsize)
  +=head1 void *ap_pcalloc(ap_pool_t *c, ap_size_t reqsize)
   
   B<Allocate a block of memory from a pool and set all of the memory to 0>
   
  @@ -262,7 +262,7 @@
   
   =cut
    */
  -APR_EXPORT(void *) ap_pcalloc(struct ap_pool_t *p, int size);
  +APR_EXPORT(void *) ap_pcalloc(struct ap_pool_t *p, ap_size_t size);
   
   /*
   
  @@ -280,7 +280,7 @@
   
   /*
   
  -=head1 char *ap_pstrndup(ap_pool_t *c, const char *s, int n)
  +=head1 char *ap_pstrndup(ap_pool_t *c, const char *s, ap_size_t n)
   
   B<duplicate the first n characters ofa string into memory allocated out of a pool>
   
  @@ -291,7 +291,7 @@
   
   =cut
    */
  -APR_EXPORT(char *) ap_pstrndup(struct ap_pool_t *p, const char *s, int n);
  +APR_EXPORT(char *) ap_pstrndup(struct ap_pool_t *p, const char *s, ap_size_t n);
   
   /*
   
  @@ -351,8 +351,8 @@
   =cut
    */
   APR_EXPORT(void) ap_register_cleanup(struct ap_pool_t *p, void *data,
  -                                      ap_status_t (*plain_cleanup) (void *),
  -                                      ap_status_t (*child_cleanup) (void *));
  +                                     ap_status_t (*plain_cleanup) (void *),
  +                                     ap_status_t (*child_cleanup) (void *));
   
   /*
   
  @@ -367,7 +367,7 @@
   =cut
    */
   APR_EXPORT(void) ap_kill_cleanup(struct ap_pool_t *p, void *data,
  -                                  ap_status_t (*cleanup) (void *));
  +                                 ap_status_t (*cleanup) (void *));
   
   /*
   
  @@ -382,7 +382,7 @@
   =cut
    */
   APR_EXPORT(ap_status_t) ap_run_cleanup(struct ap_pool_t *p, void *data,
  -                                 ap_status_t (*cleanup) (void *));
  +                                       ap_status_t (*cleanup) (void *));
   
   /*
   
  
  
  
  1.62      +18 -17    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.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- apr_pools.c	2000/07/05 20:52:33	1.61
  +++ apr_pools.c	2000/07/07 02:45:19	1.62
  @@ -416,9 +416,9 @@
   
   /* Accounting */
   
  -static long bytes_in_block_list(union block_hdr *blok)
  +static ap_size_t bytes_in_block_list(union block_hdr *blok)
   {
  -    long size = 0;
  +    ap_size_t size = 0;
   
       while (blok) {
   	size += blok->h.endp - (char *) (blok + 1);
  @@ -734,11 +734,11 @@
       free_blocks(a->first);
   }
   
  -APR_EXPORT(long) ap_bytes_in_pool(ap_pool_t *p)
  +APR_EXPORT(ap_size_t) ap_bytes_in_pool(ap_pool_t *p)
   {
       return bytes_in_block_list(p->first);
   }
  -APR_EXPORT(long) ap_bytes_in_free_blocks(void)
  +APR_EXPORT(ap_size_t) ap_bytes_in_free_blocks(void)
   {
       return bytes_in_block_list(block_freelist);
   }
  @@ -761,7 +761,8 @@
   /* Find the pool that ts belongs to, return NULL if it doesn't
    * belong to any pool.
    */
  -APR_EXPORT(ap_pool_t *) ap_find_pool(const void *ts, int (apr_abort)(int retcode))
  +APR_EXPORT(ap_pool_t *) ap_find_pool(const void *ts,
  +                                     int (*apr_abort)(int retcode))
   {
       const char *s = ts;
       union block_hdr **pb;
  @@ -828,7 +829,7 @@
    * be destroyed before p is.
    */
   APR_EXPORT(int) ap_pool_join(ap_pool_t *p, ap_pool_t *sub, 
  -                              int (*apr_abort)(int retcode))
  +                             int (*apr_abort)(int retcode))
   {
       union block_hdr *b;
   
  @@ -853,10 +854,10 @@
    * Allocating stuff...
    */
   
  -void * ap_palloc(ap_pool_t *a, int reqsize)
  +void * ap_palloc(ap_pool_t *a, ap_size_t reqsize)
   {
   #ifdef ALLOC_USE_MALLOC
  -    int size = reqsize + CLICK_SZ;
  +    ap_size_t size = reqsize + CLICK_SZ;
       void *ptr;
   
       if (a == NULL) {
  @@ -880,8 +881,8 @@
        * Round up requested size to an even number of alignment units
        * (core clicks)
        */
  -    int nclicks;
  -    int size;
  +    ap_size_t nclicks;
  +    ap_size_t size;
   
       /* First, see if we have space in the block most recently
        * allocated to this pool
  @@ -945,7 +946,7 @@
   #endif
   }
   
  -APR_EXPORT(void *) ap_pcalloc(ap_pool_t *a, int size)
  +APR_EXPORT(void *) ap_pcalloc(ap_pool_t *a, ap_size_t size)
   {
       void *res = ap_palloc(a, size);
       memset(res, '\0', size);
  @@ -966,7 +967,7 @@
       return res;
   }
   
  -APR_EXPORT(char *) ap_pstrndup(ap_pool_t *a, const char *s, int n)
  +APR_EXPORT(char *) ap_pstrndup(ap_pool_t *a, const char *s, ap_size_t n)
   {
       char *res;
   
  @@ -985,7 +986,7 @@
   
       /* Pass one --- find length of required string */
   
  -    int len = 0;
  +    ap_size_t len = 0;
       va_list adummy;
   
       va_start(adummy, a);
  @@ -1046,7 +1047,7 @@
   {
       struct psprintf_data *ps = (struct psprintf_data *)vbuff;
   #ifdef ALLOC_USE_MALLOC
  -    int size;
  +    ap_size_t size;
       char *ptr;
   
       size = (char *)ps->vbuff.curpos - ps->base;
  @@ -1062,7 +1063,7 @@
   #else
       union block_hdr *blok;
       union block_hdr *nblok;
  -    size_t cur_len;
  +    ap_size_t cur_len;
       char *strp;
   
       blok = ps->blok;
  @@ -1133,7 +1134,7 @@
   #else
       struct psprintf_data ps;
       char *strp;
  -    int size;
  +    ap_size_t size;
   
       ps.blok = p->last;
       ps.vbuff.curpos = ps.blok->h.first_avail;
  @@ -1187,7 +1188,7 @@
    */
   
   APR_EXPORT(void) ap_note_subprocess(ap_pool_t *a, ap_proc_t *pid,
  -				     enum kill_conditions how)
  +                                    enum kill_conditions how)
   {
       struct process_chain *new =
       (struct process_chain *) ap_palloc(a, sizeof(struct process_chain));
  
  
  

Mime
View raw message