apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r329142 - in /apr/apr-util/trunk: include/apr_memcache.h memcache/apr_memcache.c
Date Fri, 28 Oct 2005 07:19:50 GMT
Author: pquerna
Date: Fri Oct 28 00:19:47 2005
New Revision: 329142

URL: http://svn.apache.org/viewcvs?rev=329142&view=rev
Log:
Use apr_size_t for referencing data lengths.

Suggested By: Joe Orton

Modified:
    apr/apr-util/trunk/include/apr_memcache.h
    apr/apr-util/trunk/memcache/apr_memcache.c

Modified: apr/apr-util/trunk/include/apr_memcache.h
URL: http://svn.apache.org/viewcvs/apr/apr-util/trunk/include/apr_memcache.h?rev=329142&r1=329141&r2=329142&view=diff
==============================================================================
--- apr/apr-util/trunk/include/apr_memcache.h (original)
+++ apr/apr-util/trunk/include/apr_memcache.h Fri Oct 28 00:19:47 2005
@@ -213,7 +213,7 @@
 apr_memcache_set(apr_memcache_t *mc,
                  const char *key,
                  char *baton,
-                 const apr_uint32_t data_size,
+                 const apr_size_t data_size,
                  apr_uint32_t timeout,
                  apr_uint16_t flags);
 
@@ -232,7 +232,7 @@
 apr_memcache_add(apr_memcache_t *mc,
                  const char *key,
                  char *baton,
-                 const apr_uint32_t data_size,
+                 const apr_size_t data_size,
                  apr_uint32_t timeout,
                  apr_uint16_t flags);
 
@@ -251,7 +251,7 @@
 apr_memcache_replace(apr_memcache_t *mc,
                  const char *key,
                  char *data,
-                 const apr_uint32_t data_size,
+                 const apr_size_t data_size,
                  apr_uint32_t timeout,
                  apr_uint16_t flags);
 /**

Modified: apr/apr-util/trunk/memcache/apr_memcache.c
URL: http://svn.apache.org/viewcvs/apr/apr-util/trunk/memcache/apr_memcache.c?rev=329142&r1=329141&r2=329142&view=diff
==============================================================================
--- apr/apr-util/trunk/memcache/apr_memcache.c (original)
+++ apr/apr-util/trunk/memcache/apr_memcache.c Fri Oct 28 00:19:47 2005
@@ -479,10 +479,10 @@
 
 static apr_status_t storage_cmd_write(apr_memcache_t *mc,
                                       char *cmd,
-                                      const apr_uint32_t cmd_size,
+                                      const apr_size_t cmd_size,
                                       const char *key,
                                       char *data,
-                                      const apr_uint32_t data_size,
+                                      const apr_size_t data_size,
                                       apr_uint32_t timeout,
                                       apr_uint16_t flags)
 {
@@ -494,7 +494,7 @@
     struct iovec vec[5];
     int klen;
 
-    int key_size = strlen(key);
+    apr_size_t key_size = strlen(key);
 
     hash = apr_memcache_hash(key, key_size);
 
@@ -518,7 +518,8 @@
     vec[1].iov_base = (void*)key;
     vec[1].iov_len  = key_size;
 
-    klen = apr_snprintf(conn->buffer, BUFFER_SIZE, " %u %u %u" MC_EOL, flags, timeout,
data_size);
+    klen = apr_snprintf(conn->buffer, BUFFER_SIZE, " %u %u %" APR_SIZE_T_FMT " " MC_EOL,
+                        flags, timeout, data_size);
 
     vec[2].iov_base = conn->buffer;
     vec[2].iov_len  = klen;
@@ -564,7 +565,7 @@
 apr_memcache_set(apr_memcache_t *mc,
                  const char *key,
                  char *data,
-                 const apr_uint32_t data_size,
+                 const apr_size_t data_size,
                  apr_uint32_t timeout,
                  apr_uint16_t flags)
 {
@@ -579,7 +580,7 @@
 apr_memcache_add(apr_memcache_t *mc,
                  const char *key,
                  char *data,
-                 const apr_uint32_t data_size,
+                 const apr_size_t data_size,
                  apr_uint32_t timeout,
                  apr_uint16_t flags)
 {
@@ -594,7 +595,7 @@
 apr_memcache_replace(apr_memcache_t *mc,
                  const char *key,
                  char *data,
-                 const apr_uint32_t data_size,
+                 const apr_size_t data_size,
                  apr_uint32_t timeout,
                  apr_uint16_t flags)
 {



Mime
View raw message