[core] Use uintptr_t instead of guintptr as it requires an otherwise unneeded recent glib version

personal/stbuehler/wip
Thomas Porzelt 12 years ago
parent 2d57e56bdc
commit 0eaed50c1c
  1. 6
      src/main/mimetype.c
  2. 2
      src/main/profiler.c

@ -3,9 +3,9 @@
#include <lighttpd/plugin_core.h>
#define MIME_COUNT_CHILDREN(x) (x->cmin == 0 ? 0 : ((guint)x->cmax - x->cmin + 1))
#define MIME_MARK_NODE(x) ((gpointer)((guintptr)x | 1))
#define MIME_UNMARK_NODE(x) ((gpointer)((guintptr)x & (~1)))
#define MIME_IS_NODE(x) ((guintptr)x & 1)
#define MIME_MARK_NODE(x) ((gpointer)((uintptr_t)x | 1))
#define MIME_UNMARK_NODE(x) ((gpointer)((uintptr_t)x & (~1)))
#define MIME_IS_NODE(x) ((uintptr_t)x & 1)
LI_API liMimetypeNode *li_mimetype_node_new(void) {
return g_slice_new0(liMimetypeNode);

@ -42,7 +42,7 @@ static gint profiler_output_fd = 0;
static guint profiler_hash(gpointer addr) {
return ((guintptr)addr * 2654435761); /* ~ golden ratio of 2^32 */
return ((uintptr_t)addr * 2654435761); /* ~ golden ratio of 2^32 */
}
static profiler_block *profiler_block_new() {

Loading…
Cancel
Save