From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Meyering Subject: [PATCH tabled] adapt to changed signature of hstor_get's callback function Date: Thu, 07 Oct 2010 08:38:25 +0200 Message-ID: <87ocb6ik2m.fsf@meyering.net> Mime-Version: 1.0 Return-path: Sender: hail-devel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Project Hail * 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 --- test/large-object.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/large-object.c b/test/large-object.c index dbe2027..fc7d03c 100644 --- a/test/large-object.c +++ b/test/large-object.c @@ -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