apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wsanc...@apache.org
Subject cvs commit: apr/include apr_strings.h
Date Wed, 24 Jul 2002 23:31:57 GMT
wsanchez    2002/07/24 16:31:57

  Modified:    strings  apr_strings.c
               include  apr_strings.h
  Log:
  Use apr_int64_t instead of long long as return type for apr_strtoll() and apr_atol().
  
  Revision  Changes    Path
  1.32      +4 -4      apr/strings/apr_strings.c
  
  Index: apr_strings.c
  ===================================================================
  RCS file: /home/cvs/apr/strings/apr_strings.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- apr_strings.c	24 Jul 2002 21:23:50 -0000	1.31
  +++ apr_strings.c	24 Jul 2002 23:31:57 -0000	1.32
  @@ -233,17 +233,17 @@
   }
   #endif
   
  -APR_DECLARE(long long) apr_strtoll(const char *buf, char **end, int base)
  +APR_DECLARE(apr_int64_t) apr_strtoll(const char *buf, char **end, int base)
   {
   #if (APR_HAVE_STRTOLL)
  -    return strtoll(buf, end, base);
  +    return (apr_int64_t)strtoll(buf, end, base);
   #else
       /* best-effort function. If no strtoll, use strtol */
  -    return (long long)strtol(buf, end, base);
  +    return (apr_int64_t)strtol(buf, end, base);
   #endif
   }
   
  -APR_DECLARE(long long) apr_atoll(const char *buf)
  +APR_DECLARE(apr_int64_t) apr_atoll(const char *buf)
   {
       return apr_strtoll(buf, NULL, 0);
   }
  
  
  
  1.29      +6 -6      apr/include/apr_strings.h
  
  Index: apr_strings.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_strings.h,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- apr_strings.h	24 Jul 2002 21:23:50 -0000	1.28
  +++ apr_strings.h	24 Jul 2002 23:31:57 -0000	1.29
  @@ -327,7 +327,7 @@
   APR_DECLARE(char *) apr_off_t_toa(apr_pool_t *p, apr_off_t n);
   
   /**
  - * parse a numeric string into a long long value
  + * parse a numeric string into a 64-bit numeric value
    * @param buf The string to parse. It may contain optional whitespace,
    *   followed by an optional '+' (positive, default) or '-' (negative)
    *   character, followed by an optional '0x' prefix if base is 0 or 16,
  @@ -338,17 +338,17 @@
    *   or 0.  If base is zero, buf will be treated as base ten unless its
    *   digits are prefixed with '0x', in which case it will be treated as
    *   base 16.
  - * @return The long long value of the string.
  + * @return The numeric value of the string.
    */
  -APR_DECLARE(long long) apr_strtoll(const char *buf, char **end, int base);
  +APR_DECLARE(apr_int64_t) apr_strtoll(const char *buf, char **end, int base);
   
   /**
  - * parse a base-10 numeric string into a long long value.
  + * parse a base-10 numeric string into a 64-bit numeric value.
    * Equivalent to apr_strtoll(buf, (char**)NULL, 10).
    * @param buf The string to parse
  - * @return The long long value of the string
  + * @return The numeric value of the string
    */
  -APR_DECLARE(long long) apr_atoll(const char *buf);
  +APR_DECLARE(apr_int64_t) apr_atoll(const char *buf);
   
   /**
    * Format a binary size (magnitiudes are 2^10 rather than 10^3) from an apr_off_t,
  
  
  

Mime
View raw message