adapt to changed signature of hstor_get's callback function
PATCH 1/1 adapt to changed signature of hstor_get's callback function
* test/large-object.c: Hail has changed hstor_get's callback function so that it now declares its buffer to be "const", as all write-like functions do. Adjust this file's hstor_get callback parameter and propagate that, as required, to the local functions it uses to operate on that now-read-only buffer.
Signed-off-by Jim Meyering <[email protected]>
--- test/large-object.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
test/large-object.c +5 -4
@@ -1,6 +1,6 @@/* -* Copyright 2008-2009 Red Hat, Inc. +* Copyright 2008-2010 Red Hat, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by
@@ -60,7 +60,7 @@ static char key[] = "Key of Large Object";#define CSUM_INIT 0xFFFFFFFF -static void incrsum (unsigned int *psum,unsigned char *data,size_t len) +static void incrsum (unsigned int *psum,const unsigned char *data,size_t len) {unsigned int sum;
@@ -108,7 +108,7 @@ static size_t put_cb(void *ptr, size_t membsize, size_t nmemb, void *user_data)return rem; } -static size_t get_one (struct get_ctx *ctx,unsigned char *data,size_t len) +static size_t get_one (struct get_ctx *ctx,const unsigned char *data,size_t len) {unsigned num;size_t rem;
@@ -143,7 +143,8 @@ static size_t get_one(struct get_ctx *ctx, unsigned char *data, size_t len)return rem; } -static size_t get_cb (void *ptr,size_t membsize,size_t nmemb,void *user_data) +static size_t get_cb (const void *ptr,size_t membsize,size_t nmemb, +void *user_data) {struct get_ctx *ctx = user_data;size_t togo, len;
--
1.7.3.1.50.g1e633