apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apr/strings apr_strings.c
Date Wed, 24 Jul 2002 21:23:50 GMT
trawick     2002/07/24 14:23:50

  Modified:    include  apr_strings.h
               strings  apr_strings.c
  Log:
  add some needed const to apr_strtoll and apr_atoll
  
  fix the parms to strtol[l] in apr_strtoll
  
  Revision  Changes    Path
  1.28      +2 -2      apr/include/apr_strings.h
  
  Index: apr_strings.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_strings.h,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- apr_strings.h	24 Jul 2002 20:29:38 -0000	1.27
  +++ apr_strings.h	24 Jul 2002 21:23:50 -0000	1.28
  @@ -340,7 +340,7 @@
    *   base 16.
    * @return The long long value of the string.
    */
  -APR_DECLARE(long long) apr_strtoll(char *buf, char **end, int base);
  +APR_DECLARE(long long) apr_strtoll(const char *buf, char **end, int base);
   
   /**
    * parse a base-10 numeric string into a long long value.
  @@ -348,7 +348,7 @@
    * @param buf The string to parse
    * @return The long long value of the string
    */
  -APR_DECLARE(long long) apr_atoll(char *buf);
  +APR_DECLARE(long long) apr_atoll(const char *buf);
   
   /**
    * Format a binary size (magnitiudes are 2^10 rather than 10^3) from an apr_off_t,
  
  
  
  1.31      +4 -4      apr/strings/apr_strings.c
  
  Index: apr_strings.c
  ===================================================================
  RCS file: /home/cvs/apr/strings/apr_strings.c,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- apr_strings.c	24 Jul 2002 20:29:38 -0000	1.30
  +++ apr_strings.c	24 Jul 2002 21:23:50 -0000	1.31
  @@ -233,17 +233,17 @@
   }
   #endif
   
  -APR_DECLARE(long long) apr_strtoll(char *buf, char **end, int base)
  +APR_DECLARE(long long) apr_strtoll(const char *buf, char **end, int base)
   {
   #if (APR_HAVE_STRTOLL)
  -    return strtoll(buf, NULL, 0);
  +    return strtoll(buf, end, base);
   #else
       /* best-effort function. If no strtoll, use strtol */
  -    return (long long)strtol(buf, NULL, 0);
  +    return (long long)strtol(buf, end, base);
   #endif
   }
   
  -APR_DECLARE(long long) apr_atoll(char *buf)
  +APR_DECLARE(long long) apr_atoll(const char *buf)
   {
       return apr_strtoll(buf, NULL, 0);
   }
  
  
  

Mime
View raw message