From: Jim Meyering <jim@meyering.net>
To: Project Hail <hail-devel@vger.kernel.org>
Subject: [PATCH tabled] adapt to changed signature of hstor_get's callback function
Date: Thu, 07 Oct 2010 08:38:25 +0200 [thread overview]
Message-ID: <87ocb6ik2m.fsf@meyering.net> (raw)
* 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 <meyering@redhat.com>
---
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
reply other threads:[~2010-10-07 6:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ocb6ik2m.fsf@meyering.net \
--to=jim@meyering.net \
--cc=hail-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox