ref: refs/heads/master
commit 3758478a9e07fb0c04701519fe4982d45180c7b3
Author: Klaus Kämpf
Date: Mon Jun 22 16:04:51 2009 +0200
Pass a const Pool to debugcallback
---
src/pool.c | 2 +-
src/pool.h | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/pool.c b/src/pool.c
index ec87a4b..438a5cd 100644
--- a/src/pool.c
+++ b/src/pool.c
@@ -738,7 +738,7 @@ pool_addrelproviders(Pool *pool, Id d)
/*************************************************************************/
void
-pool_debug(Pool *pool, int type, const char *format, ...)
+pool_debug(const Pool *pool, int type, const char *format, ...)
{
va_list args;
char buf[1024];
diff --git a/src/pool.h b/src/pool.h
index c24ecc5..5f30321 100644
--- a/src/pool.h
+++ b/src/pool.h
@@ -108,7 +108,7 @@ struct _Pool {
/* debug mask and callback */
int debugmask;
- void (*debugcallback)(struct _Pool *, void *data, int type, const char *str);
+ void (*debugcallback)(const struct _Pool *, void *data, int type, const char *str);
void *debugcallbackdata;
/* load callback */
@@ -171,7 +171,7 @@ extern Pool *pool_create(void);
*/
extern void pool_free(Pool *pool);
-extern void pool_debug(Pool *pool, int type, const char *format, ...) __attribute__((format(printf, 3, 4)));
+extern void pool_debug(const Pool *pool, int type, const char *format, ...) __attribute__((format(printf, 3, 4)));
extern char *pool_alloctmpspace(Pool *pool, int len);
@@ -238,7 +238,7 @@ extern void pool_addfileprovides_ids(Pool *pool, struct _Repo *installed, Id **i
extern void pool_freewhatprovides(Pool *pool);
extern Id pool_queuetowhatprovides(Pool *pool, Queue *q);
-static inline int pool_installable(Pool *pool, Solvable *s)
+static inline int pool_installable(const Pool *pool, Solvable *s)
{
if (!s->arch || s->arch == ARCH_SRC || s->arch == ARCH_NOSRC)
return 0;
@@ -274,7 +274,7 @@ static inline Id *pool_whatprovides_ptr(Pool *pool, Id d)
extern void pool_setdebuglevel(Pool *pool, int level);
-static inline void pool_setdebugcallback(Pool *pool, void (*debugcallback)(struct _Pool *, void *data, int type, const char *str), void *debugcallbackdata)
+static inline void pool_setdebugcallback(Pool *pool, void (*debugcallback)(const struct _Pool *, void *data, int type, const char *str), void *debugcallbackdata)
{
pool->debugcallback = debugcallback;
pool->debugcallbackdata = debugcallbackdata;
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org