From: Michael Schroeder Date: Mon, 22 Jun 2009 14:15:51 +0000 (+0200) Subject: - revert debugcallback Pool constness, as the callback may want to do X-Git-Tag: BASE-SuSE-Code-12_1-Branch~231^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=599c0d998679209104b9cdaccd30cd3a018389ce;p=platform%2Fupstream%2Flibsolv.git - revert debugcallback Pool constness, as the callback may want to do fancy things like changing the debugmask --- diff --git a/src/pool.c b/src/pool.c index 438a5cd..ec87a4b 100644 --- a/src/pool.c +++ b/src/pool.c @@ -738,7 +738,7 @@ pool_addrelproviders(Pool *pool, Id d) /*************************************************************************/ void -pool_debug(const Pool *pool, int type, const char *format, ...) +pool_debug(Pool *pool, int type, const char *format, ...) { va_list args; char buf[1024]; diff --git a/src/pool.h b/src/pool.h index 5f30321..62134c8 100644 --- a/src/pool.h +++ b/src/pool.h @@ -108,7 +108,7 @@ struct _Pool { /* debug mask and callback */ int debugmask; - void (*debugcallback)(const struct _Pool *, void *data, int type, const char *str); + void (*debugcallback)(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(const Pool *pool, int type, const char *format, ...) __attribute__((format(printf, 3, 4))); +extern void pool_debug(Pool *pool, int type, const char *format, ...) __attribute__((format(printf, 3, 4))); extern char *pool_alloctmpspace(Pool *pool, int len); @@ -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)(const struct _Pool *, void *data, int type, const char *str), void *debugcallbackdata) +static inline void pool_setdebugcallback(Pool *pool, void (*debugcallback)(struct _Pool *, void *data, int type, const char *str), void *debugcallbackdata) { pool->debugcallback = debugcallback; pool->debugcallbackdata = debugcallbackdata;