aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
Diffstat (limited to 'epan')
-rw-r--r--epan/wmem/wmem_allocator.h2
-rw-r--r--epan/wmem/wmem_allocator_glib.c2
-rw-r--r--epan/wmem/wmem_core.c4
-rw-r--r--epan/wmem/wmem_core.h4
-rw-r--r--epan/wmem/wmem_slab.c2
-rw-r--r--epan/wmem/wmem_slab.h2
-rw-r--r--epan/wmem/wmem_stack.c4
-rw-r--r--epan/wmem/wmem_stack.h4
-rw-r--r--epan/wmem/wmem_strutl.c2
-rw-r--r--epan/wmem/wmem_strutl.h2
10 files changed, 14 insertions, 14 deletions
diff --git a/epan/wmem/wmem_allocator.h b/epan/wmem/wmem_allocator.h
index 3009254c1f..e3246e7ed6 100644
--- a/epan/wmem/wmem_allocator.h
+++ b/epan/wmem/wmem_allocator.h
@@ -33,7 +33,7 @@ extern "C" {
#endif /* __cplusplus */
struct _wmem_allocator_t {
- void *(*alloc)(void *private_data, size_t size);
+ void *(*alloc)(void *private_data, const size_t size);
void (*free_all)(void *private_data);
void (*destroy)(struct _wmem_allocator_t *allocator);
diff --git a/epan/wmem/wmem_allocator_glib.c b/epan/wmem/wmem_allocator_glib.c
index 17a7690074..600f1849c8 100644
--- a/epan/wmem/wmem_allocator_glib.c
+++ b/epan/wmem/wmem_allocator_glib.c
@@ -37,7 +37,7 @@ typedef struct _wmem_glib_allocator_t {
} wmem_glib_allocator_t;
static void *
-wmem_glib_alloc(void *private_data, size_t size)
+wmem_glib_alloc(void *private_data, const size_t size)
{
void *buf;
wmem_glib_allocator_t *allocator = (wmem_glib_allocator_t*) private_data;
diff --git a/epan/wmem/wmem_core.c b/epan/wmem/wmem_core.c
index f7ad1aed86..ec1a0e9134 100644
--- a/epan/wmem/wmem_core.c
+++ b/epan/wmem/wmem_core.c
@@ -31,13 +31,13 @@
#include "wmem_allocator_glib.h"
void *
-wmem_alloc(wmem_allocator_t *allocator, size_t size)
+wmem_alloc(wmem_allocator_t *allocator, const size_t size)
{
return allocator->alloc(allocator->private_data, size);
}
void *
-wmem_alloc0(wmem_allocator_t *allocator, size_t size)
+wmem_alloc0(wmem_allocator_t *allocator, const size_t size)
{
void *buf;
diff --git a/epan/wmem/wmem_core.h b/epan/wmem/wmem_core.h
index 7937a8bda3..2b6e1ff3f1 100644
--- a/epan/wmem/wmem_core.h
+++ b/epan/wmem/wmem_core.h
@@ -37,10 +37,10 @@ struct _wmem_allocator_t;
typedef struct _wmem_allocator_t wmem_allocator_t;
void *
-wmem_alloc(wmem_allocator_t *allocator, size_t size);
+wmem_alloc(wmem_allocator_t *allocator, const size_t size);
void *
-wmem_alloc0(wmem_allocator_t *allocator, size_t size);
+wmem_alloc0(wmem_allocator_t *allocator, const size_t size);
void
wmem_free_all(wmem_allocator_t *allocator);
diff --git a/epan/wmem/wmem_slab.c b/epan/wmem/wmem_slab.c
index 5430fac92c..82ae944eea 100644
--- a/epan/wmem/wmem_slab.c
+++ b/epan/wmem/wmem_slab.c
@@ -89,7 +89,7 @@ wmem_slab_free(wmem_slab_t *slab, void *object)
}
wmem_slab_t *
-wmem_create_slab(wmem_allocator_t *allocator, size_t chunk_size)
+wmem_create_slab(wmem_allocator_t *allocator, const size_t chunk_size)
{
wmem_slab_t *slab;
diff --git a/epan/wmem/wmem_slab.h b/epan/wmem/wmem_slab.h
index 845059e4b7..658bf9ad09 100644
--- a/epan/wmem/wmem_slab.h
+++ b/epan/wmem/wmem_slab.h
@@ -45,7 +45,7 @@ void
wmem_slab_free(wmem_slab_t *slab, void *object);
wmem_slab_t *
-wmem_create_slab(wmem_allocator_t *allocator, size_t chunk_size);
+wmem_create_slab(wmem_allocator_t *allocator, const size_t chunk_size);
#ifdef __cplusplus
}
diff --git a/epan/wmem/wmem_stack.c b/epan/wmem/wmem_stack.c
index e38c9ab496..89302edc5c 100644
--- a/epan/wmem/wmem_stack.c
+++ b/epan/wmem/wmem_stack.c
@@ -42,13 +42,13 @@ struct _wmem_stack_t {
};
guint
-wmem_stack_count(wmem_stack_t *stack)
+wmem_stack_count(const wmem_stack_t *stack)
{
return stack->count;
}
void *
-wmem_stack_peek(wmem_stack_t *stack)
+wmem_stack_peek(const wmem_stack_t *stack)
{
g_assert(stack->top != NULL);
g_assert(stack->count > 0);
diff --git a/epan/wmem/wmem_stack.h b/epan/wmem/wmem_stack.h
index 64ed23b4b4..0638ba7cc2 100644
--- a/epan/wmem/wmem_stack.h
+++ b/epan/wmem/wmem_stack.h
@@ -40,10 +40,10 @@ struct _wmem_stack_t;
typedef struct _wmem_stack_t wmem_stack_t;
guint
-wmem_stack_count(wmem_stack_t *stack);
+wmem_stack_count(const wmem_stack_t *stack);
void *
-wmem_stack_peek(wmem_stack_t *stack);
+wmem_stack_peek(const wmem_stack_t *stack);
void *
wmem_stack_pop(wmem_stack_t *stack);
diff --git a/epan/wmem/wmem_strutl.c b/epan/wmem/wmem_strutl.c
index 82dd481eb9..6026e6c657 100644
--- a/epan/wmem/wmem_strutl.c
+++ b/epan/wmem/wmem_strutl.c
@@ -48,7 +48,7 @@ wmem_strdup(wmem_allocator_t *allocator, const gchar *src)
}
gchar *
-wmem_strndup(wmem_allocator_t *allocator, const gchar *src, size_t len)
+wmem_strndup(wmem_allocator_t *allocator, const gchar *src, const size_t len)
{
gchar *dst;
guint i;
diff --git a/epan/wmem/wmem_strutl.h b/epan/wmem/wmem_strutl.h
index f02924b9e3..d62389b97d 100644
--- a/epan/wmem/wmem_strutl.h
+++ b/epan/wmem/wmem_strutl.h
@@ -38,7 +38,7 @@ gchar *
wmem_strdup(wmem_allocator_t *allocator, const gchar *src);
gchar *
-wmem_strndup(wmem_allocator_t *allocator, const gchar *src, size_t len);
+wmem_strndup(wmem_allocator_t *allocator, const gchar *src, const size_t len);
#ifdef __cplusplus
}