summaryrefslogtreecommitdiff
path: root/memory
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2001-05-16 05:30:52 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2001-05-16 05:30:52 +0000
commit22c3e557283950e9ba8afb403c83e93dbeab6a3b (patch)
tree9b5c141c29ce4f9039ae69d5f41e3df5647d75f3 /memory
parent55f05d65e92ff3f1e83b9e5af5b9bb6a0a888db5 (diff)
downloadlibapr-22c3e557283950e9ba8afb403c83e93dbeab6a3b.tar.gz
Sing, "we are apr"... and make all hash functions accept apr_ssize_t
if we are going to bury -1 flags (I'd prefer the flag cast to apr_size_t and use that value throughout the hash api, however.) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61649 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'memory')
-rw-r--r--memory/unix/apr_pools.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/memory/unix/apr_pools.c b/memory/unix/apr_pools.c
index 7d34df7ff..4a87c987c 100644
--- a/memory/unix/apr_pools.c
+++ b/memory/unix/apr_pools.c
@@ -347,7 +347,7 @@ static void *mprotect_realloc(void *addr, apr_size_t size)
* Get a completely new block from the system pool. Note that we rely on
* malloc() to provide aligned memory.
*/
-static union block_hdr *malloc_block(int size, apr_abortfunc_t abortfunc)
+static union block_hdr *malloc_block(apr_size_t size, apr_abortfunc_t abortfunc)
{
union block_hdr *blok;
@@ -506,7 +506,7 @@ static void free_blocks(union block_hdr *blok)
* Get a new block, from our own free list if possible, from the system
* if necessary. Must be called with alarms blocked.
*/
-static union block_hdr *new_block(int min_size, apr_abortfunc_t abortfunc)
+static union block_hdr *new_block(apr_size_t min_size, apr_abortfunc_t abortfunc)
{
union block_hdr **lastptr = &block_freelist;
union block_hdr *blok = block_freelist;
@@ -516,7 +516,7 @@ static union block_hdr *new_block(int min_size, apr_abortfunc_t abortfunc)
*/
while (blok != NULL) {
- if (min_size + BLOCK_MINFREE <= blok->h.endp - blok->h.first_avail) {
+ if ((apr_ssize_t)min_size + BLOCK_MINFREE <= blok->h.endp - blok->h.first_avail) {
*lastptr = blok->h.next;
blok->h.next = NULL;
debug_verify_filled(blok->h.first_avail, blok->h.endp,
@@ -1169,7 +1169,7 @@ APR_DECLARE(apr_status_t) apr_pool_userdata_set(const void *data, const char *ke
apr_status_t (*cleanup) (void *),
apr_pool_t *cont)
{
- int keylen = strlen(key);
+ apr_size_t keylen = strlen(key);
if (cont->prog_data == NULL)
cont->prog_data = apr_hash_make(cont);