All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH tabled] adapt to changed signature of hstor_get's callback function
@ 2010-10-07  6:38 Jim Meyering
  0 siblings, 0 replies; only message in thread
From: Jim Meyering @ 2010-10-07  6:38 UTC (permalink / raw)
  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 <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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-10-07  6:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-07  6:38 [PATCH tabled] adapt to changed signature of hstor_get's callback function Jim Meyering

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.