apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r585373 - in /apr/apr-util/trunk: include/apr_memcache.h memcache/apr_memcache.c
Date Wed, 17 Oct 2007 05:00:50 GMT
Author: wrowe
Date: Tue Oct 16 22:00:49 2007
New Revision: 585373

URL: http://svn.apache.org/viewvc?rev=585373&view=rev
Log:
A declare macro has a scope of ONE LIBRARY ONLY.

And this ain't the one.

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/viewvc/apr/apr-util/trunk/include/apr_memcache.h?rev=585373&r1=585372&r2=585373&view=diff
==============================================================================
--- apr/apr-util/trunk/include/apr_memcache.h (original)
+++ apr/apr-util/trunk/include/apr_memcache.h Tue Oct 16 22:00:49 2007
@@ -125,21 +125,21 @@
  * @return crc32 hash of data
  * @remark The crc32 hash is not compatible with old memcached clients.
  */
-APR_DECLARE(apr_uint32_t) apr_memcache_hash(apr_memcache_t *mc,
+APU_DECLARE(apr_uint32_t) apr_memcache_hash(apr_memcache_t *mc,
                                             const char *data,
                                             apr_size_t data_len);
 
 /**
  * Pure CRC32 Hash. Used by some clients.
  */
-APR_DECLARE(apr_uint32_t) apr_memcache_hash_crc32(void *baton,
+APU_DECLARE(apr_uint32_t) apr_memcache_hash_crc32(void *baton,
                                                     const char *data,
                                                     apr_size_t data_len);
 
 /**
  * hash compatible with the standard Perl Client.
  */
-APR_DECLARE(apr_uint32_t) apr_memcache_hash_default(void *baton,
+APU_DECLARE(apr_uint32_t) apr_memcache_hash_default(void *baton,
                                                     const char *data,
                                                     apr_size_t data_len);
 
@@ -150,13 +150,13 @@
  * @return server that controls specified hash
  * @see apr_memcache_hash
  */
-APR_DECLARE(apr_memcache_server_t *) apr_memcache_find_server_hash(apr_memcache_t *mc, 
+APU_DECLARE(apr_memcache_server_t *) apr_memcache_find_server_hash(apr_memcache_t *mc, 
                                                                    const apr_uint32_t hash);
 
 /**
  * server selection compatible with the standard Perl Client.
  */
-APR_DECLARE(apr_memcache_server_t *)
+APU_DECLARE(apr_memcache_server_t *)
 apr_memcache_find_server_hash_default(void *baton,
                                       apr_memcache_t *mc, 
                                       const apr_uint32_t hash);
@@ -169,7 +169,7 @@
  * @warning Changing servers after startup may cause keys to go to
  * different servers.
  */
-APR_DECLARE(apr_status_t) apr_memcache_add_server(apr_memcache_t *mc,
+APU_DECLARE(apr_status_t) apr_memcache_add_server(apr_memcache_t *mc,
                                                   apr_memcache_server_t *server);
 
 
@@ -180,7 +180,7 @@
  * @param port Port of the server
  * @return Server with matching Hostname and Port, or NULL if none was found.
  */
-APR_DECLARE(apr_memcache_server_t *) apr_memcache_find_server(apr_memcache_t *mc,
+APU_DECLARE(apr_memcache_server_t *) apr_memcache_find_server(apr_memcache_t *mc,
                                                               const char *host,
                                                               apr_port_t port);
 
@@ -189,7 +189,7 @@
  * @param mc The memcache client object to use
  * @param ms Server to Activate
  */
-APR_DECLARE(apr_status_t) apr_memcache_enable_server(apr_memcache_t *mc,
+APU_DECLARE(apr_status_t) apr_memcache_enable_server(apr_memcache_t *mc,
                                                      apr_memcache_server_t *ms);
 
 
@@ -198,7 +198,7 @@
  * @param mc The memcache client object to use
  * @param ms Server to Disable
  */
-APR_DECLARE(apr_status_t) apr_memcache_disable_server(apr_memcache_t *mc,
+APU_DECLARE(apr_status_t) apr_memcache_disable_server(apr_memcache_t *mc,
                                                       apr_memcache_server_t *ms);
 
 /**
@@ -214,7 +214,7 @@
  * @see apr_reslist_create
  * @remark min, smax, and max are only used when APR_HAS_THREADS
  */
-APR_DECLARE(apr_status_t) apr_memcache_server_create(apr_pool_t *p,
+APU_DECLARE(apr_status_t) apr_memcache_server_create(apr_pool_t *p,
                                                      const char *host,
                                                      apr_port_t port,
                                                      apr_uint32_t min,
@@ -229,7 +229,7 @@
  * @param flags Not currently used
  * @param mc   location of the new memcache client object
  */
-APR_DECLARE(apr_status_t) apr_memcache_create(apr_pool_t *p,
+APU_DECLARE(apr_status_t) apr_memcache_create(apr_pool_t *p,
                                               apr_uint16_t max_servers,
                                               apr_uint32_t flags,
                                               apr_memcache_t **mc);
@@ -244,7 +244,7 @@
  * @param flags any flags set by the client for this key
  * @return 
  */
-APR_DECLARE(apr_status_t) apr_memcache_getp(apr_memcache_t *mc, 
+APU_DECLARE(apr_status_t) apr_memcache_getp(apr_memcache_t *mc, 
                                             apr_pool_t *p,
                                             const char* key,
                                             char **baton,
@@ -260,7 +260,7 @@
  * @param values hash of keys and values that this key will be added to
  * @return
  */
-APR_DECLARE(void) 
+APU_DECLARE(void) 
 apr_memcache_add_multget_key(apr_pool_t *data_pool,
                              const char* key,
                              apr_hash_t **values);
@@ -275,7 +275,7 @@
  *        result of the multiget call.
  * @return
  */
-APR_DECLARE(apr_status_t)
+APU_DECLARE(apr_status_t)
 apr_memcache_multgetp(apr_memcache_t *mc,
                       apr_pool_t *temp_pool,
                       apr_pool_t *data_pool,
@@ -290,7 +290,7 @@
  * @param timeout time in seconds for the data to live on the server
  * @param flags any flags set by the client for this key
  */
-APR_DECLARE(apr_status_t) apr_memcache_set(apr_memcache_t *mc,
+APU_DECLARE(apr_status_t) apr_memcache_set(apr_memcache_t *mc,
                                            const char *key,
                                            char *baton,
                                            const apr_size_t data_size,
@@ -308,7 +308,7 @@
  * @return APR_SUCCESS if the key was added, APR_EEXIST if the key 
  * already exists on the server.
  */
-APR_DECLARE(apr_status_t) apr_memcache_add(apr_memcache_t *mc,
+APU_DECLARE(apr_status_t) apr_memcache_add(apr_memcache_t *mc,
                                            const char *key,
                                            char *baton,
                                            const apr_size_t data_size,
@@ -326,7 +326,7 @@
  * @return APR_SUCCESS if the key was added, APR_EEXIST if the key 
  * did not exist on the server.
  */
-APR_DECLARE(apr_status_t) apr_memcache_replace(apr_memcache_t *mc,
+APU_DECLARE(apr_status_t) apr_memcache_replace(apr_memcache_t *mc,
                                                const char *key,
                                                char *data,
                                                const apr_size_t data_size,
@@ -338,7 +338,7 @@
  * @param key   null terminated string containing the key
  * @param timeout time for the delete to stop other clients from adding
  */
-APR_DECLARE(apr_status_t) apr_memcache_delete(apr_memcache_t *mc,
+APU_DECLARE(apr_status_t) apr_memcache_delete(apr_memcache_t *mc,
                                               const char *key,
                                               apr_uint32_t timeout);
 
@@ -349,7 +349,7 @@
  * @param n     number to increment by
  * @param nv    new value after incrmenting
  */
-APR_DECLARE(apr_status_t) apr_memcache_incr(apr_memcache_t *mc, 
+APU_DECLARE(apr_status_t) apr_memcache_incr(apr_memcache_t *mc, 
                                             const char *key,
                                             apr_int32_t n,
                                             apr_uint32_t *nv);
@@ -361,7 +361,7 @@
  * @param n     number to decrement by
  * @param nv    new value after decrementing
  */
-APR_DECLARE(apr_status_t) apr_memcache_decr(apr_memcache_t *mc, 
+APU_DECLARE(apr_status_t) apr_memcache_decr(apr_memcache_t *mc, 
                                             const char *key,
                                             apr_int32_t n,
                                             apr_uint32_t *new_value);
@@ -373,7 +373,7 @@
  * @param baton location to store server version string
  * @param len   length of the server version string
  */
-APR_DECLARE(apr_status_t) apr_memcache_version(apr_memcache_server_t *ms,
+APU_DECLARE(apr_status_t) apr_memcache_version(apr_memcache_server_t *ms,
                                                apr_pool_t *p,
                                                char **baton);
 
@@ -432,7 +432,7 @@
  * @param p     Pool to allocate answer from
  * @param stats location of the new statistics structure
  */
-APR_DECLARE(apr_status_t) apr_memcache_stats(apr_memcache_server_t *ms, 
+APU_DECLARE(apr_status_t) apr_memcache_stats(apr_memcache_server_t *ms, 
                                              apr_pool_t *p,
                                              apr_memcache_stats_t **stats);
 

Modified: apr/apr-util/trunk/memcache/apr_memcache.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/memcache/apr_memcache.c?rev=585373&r1=585372&r2=585373&view=diff
==============================================================================
--- apr/apr-util/trunk/memcache/apr_memcache.c (original)
+++ apr/apr-util/trunk/memcache/apr_memcache.c Tue Oct 16 22:00:49 2007
@@ -129,7 +129,7 @@
 }
 
 
-APR_DECLARE(apr_status_t) apr_memcache_add_server(apr_memcache_t *mc, apr_memcache_server_t
*ms)
+APU_DECLARE(apr_status_t) apr_memcache_add_server(apr_memcache_t *mc, apr_memcache_server_t
*ms)
 {
     apr_status_t rv = APR_SUCCESS;
 
@@ -145,7 +145,7 @@
 
 static apr_status_t mc_version_ping(apr_memcache_server_t *ms);
 
-APR_DECLARE(apr_memcache_server_t *) 
+APU_DECLARE(apr_memcache_server_t *) 
 apr_memcache_find_server_hash(apr_memcache_t *mc, const apr_uint32_t hash)
 {
     if (mc->server_func) {
@@ -156,7 +156,7 @@
     }
 }   
 
-APR_DECLARE(apr_memcache_server_t *) 
+APU_DECLARE(apr_memcache_server_t *) 
 apr_memcache_find_server_hash_default(void *baton, apr_memcache_t *mc,
                                       const apr_uint32_t hash)
 {
@@ -207,7 +207,7 @@
     return ms;
 }
 
-APR_DECLARE(apr_memcache_server_t *) apr_memcache_find_server(apr_memcache_t *mc, const char
*host, apr_port_t port)
+APU_DECLARE(apr_memcache_server_t *) apr_memcache_find_server(apr_memcache_t *mc, const char
*host, apr_port_t port)
 {
     int i;
 
@@ -250,7 +250,7 @@
 #endif
 }
 
-APR_DECLARE(apr_status_t) apr_memcache_enable_server(apr_memcache_t *mc, apr_memcache_server_t
*ms)
+APU_DECLARE(apr_status_t) apr_memcache_enable_server(apr_memcache_t *mc, apr_memcache_server_t
*ms)
 {
     apr_status_t rv = APR_SUCCESS;
 
@@ -262,7 +262,7 @@
     return rv;
 }
 
-APR_DECLARE(apr_status_t) apr_memcache_disable_server(apr_memcache_t *mc, apr_memcache_server_t
*ms)
+APU_DECLARE(apr_status_t) apr_memcache_disable_server(apr_memcache_t *mc, apr_memcache_server_t
*ms)
 {
     return make_server_dead(mc, ms);
 }
@@ -363,7 +363,7 @@
     return APR_SUCCESS;
 }
 
-APR_DECLARE(apr_status_t) apr_memcache_server_create(apr_pool_t *p, 
+APU_DECLARE(apr_status_t) apr_memcache_server_create(apr_pool_t *p, 
                                                      const char *host, apr_port_t port, 
                                                      apr_uint32_t min, apr_uint32_t smax,
                                                      apr_uint32_t max, apr_uint32_t ttl,
@@ -408,7 +408,7 @@
     return rv;
 }
 
-APR_DECLARE(apr_status_t) apr_memcache_create(apr_pool_t *p,
+APU_DECLARE(apr_status_t) apr_memcache_create(apr_pool_t *p,
                                               apr_uint16_t max_servers, apr_uint32_t flags,
                                               apr_memcache_t **memcache) 
 {
@@ -502,7 +502,7 @@
   0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d,
 };
 
-APR_DECLARE(apr_uint32_t) apr_memcache_hash_crc32(void *baton, 
+APU_DECLARE(apr_uint32_t) apr_memcache_hash_crc32(void *baton, 
                                                     const char *data,
                                                     const apr_size_t data_len)
 {
@@ -516,7 +516,7 @@
     return ~crc;
 }
 
-APR_DECLARE(apr_uint32_t) apr_memcache_hash_default(void *baton, 
+APU_DECLARE(apr_uint32_t) apr_memcache_hash_default(void *baton, 
                                                     const char *data,
                                                     const apr_size_t data_len)
 {
@@ -526,7 +526,7 @@
     return ((apr_memcache_hash_crc32(baton, data, data_len) >> 16) & 0x7fff);
 }
 
-APR_DECLARE(apr_uint32_t) apr_memcache_hash(apr_memcache_t *mc,
+APU_DECLARE(apr_uint32_t) apr_memcache_hash(apr_memcache_t *mc,
                                             const char *data,
                                             const apr_size_t data_len)
 {
@@ -645,7 +645,7 @@
     return rv;
 }
 
-APR_DECLARE(apr_status_t)
+APU_DECLARE(apr_status_t)
 apr_memcache_set(apr_memcache_t *mc,
                  const char *key,
                  char *data,
@@ -660,7 +660,7 @@
                            timeout, flags);
 }
 
-APR_DECLARE(apr_status_t)
+APU_DECLARE(apr_status_t)
 apr_memcache_add(apr_memcache_t *mc,
                  const char *key,
                  char *data,
@@ -675,7 +675,7 @@
                            timeout, flags);
 }
 
-APR_DECLARE(apr_status_t)
+APU_DECLARE(apr_status_t)
 apr_memcache_replace(apr_memcache_t *mc,
                  const char *key,
                  char *data,
@@ -691,7 +691,7 @@
 
 }
 
-APR_DECLARE(apr_status_t)
+APU_DECLARE(apr_status_t)
 apr_memcache_getp(apr_memcache_t *mc,
                   apr_pool_t *p,
                   const char *key,
@@ -828,7 +828,7 @@
     return rv;
 }
 
-APR_DECLARE(apr_status_t)
+APU_DECLARE(apr_status_t)
 apr_memcache_delete(apr_memcache_t *mc,
                     const char *key,
                     apr_uint32_t timeout)
@@ -967,7 +967,7 @@
     return rv;
 }
 
-APR_DECLARE(apr_status_t)
+APU_DECLARE(apr_status_t)
 apr_memcache_incr(apr_memcache_t *mc,
                     const char *key,
                     apr_int32_t inc,
@@ -982,7 +982,7 @@
 }
 
 
-APR_DECLARE(apr_status_t)
+APU_DECLARE(apr_status_t)
 apr_memcache_decr(apr_memcache_t *mc,
                     const char *key,
                     apr_int32_t inc,
@@ -998,7 +998,7 @@
 
 
 
-APR_DECLARE(apr_status_t)
+APU_DECLARE(apr_status_t)
 apr_memcache_version(apr_memcache_server_t *ms,
                   apr_pool_t *p,
                   char **baton)
@@ -1081,7 +1081,7 @@
 }
 
 
-APR_DECLARE(void) 
+APU_DECLARE(void) 
 apr_memcache_add_multget_key(apr_pool_t *data_pool,
                              const char* key,
                              apr_hash_t **values)
@@ -1136,7 +1136,7 @@
     apr_hash_set(server_queries, &ms, sizeof(ms), NULL);
 }
 
-APR_DECLARE(apr_status_t)
+APU_DECLARE(apr_status_t)
 apr_memcache_multgetp(apr_memcache_t *mc,
                       apr_pool_t *temp_pool,
                       apr_pool_t *data_pool,
@@ -1598,7 +1598,7 @@
     else mc_do_stat(threads, uint32)
 }
 
-APR_DECLARE(apr_status_t)
+APU_DECLARE(apr_status_t)
 apr_memcache_stats(apr_memcache_server_t *ms,
                   apr_pool_t *p,
                   apr_memcache_stats_t **stats) 



Mime
View raw message