From 4420d9b1e37c48ce1d42ad1845d8c516bab59109 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm <mast@lysator.liu.se> Date: Mon, 19 Apr 2010 15:50:11 +0200 Subject: [PATCH] Some const fixes. Rev: src/gc.h:1.141 Rev: src/object.c:1.308 Rev: src/object.h:1.99 --- src/gc.h | 6 +++--- src/object.c | 4 ++-- src/object.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gc.h b/src/gc.h index a1c31f7a22..1b2fa7f835 100644 --- a/src/gc.h +++ b/src/gc.h @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: gc.h,v 1.140 2010/04/16 00:15:17 mast Exp $ +|| $Id: gc.h,v 1.141 2010/04/19 13:50:10 mast Exp $ */ #ifndef GC_H @@ -672,7 +672,7 @@ static INLINE void real_visit_short_svalue (const union anything *u, TYPE_T t, (real_visit_short_svalue (debug_malloc_pass ((U)->ptr), (T), (REF_TYPE))) #ifdef DEBUG_MALLOC -static INLINE void dmalloc_visit_svalue (struct svalue *s, +static INLINE void dmalloc_visit_svalue (const struct svalue *s, int ref_type, char *l) { int t = s->type; @@ -686,7 +686,7 @@ static INLINE void dmalloc_visit_svalue (struct svalue *s, #define visit_svalue(S, REF_TYPE) \ dmalloc_visit_svalue ((S), (REF_TYPE), DMALLOC_LOCATION()) #else -static INLINE void visit_svalue (struct svalue *s, int ref_type) +static INLINE void visit_svalue (const struct svalue *s, int ref_type) { int t = s->type; check_svalue (s); diff --git a/src/object.c b/src/object.c index 240ff2604e..95e436b91b 100644 --- a/src/object.c +++ b/src/object.c @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: object.c,v 1.307 2010/04/11 17:26:23 mast Exp $ +|| $Id: object.c,v 1.308 2010/04/19 13:50:10 mast Exp $ */ #include "global.h" @@ -2020,7 +2020,7 @@ PMOD_EXPORT void visit_object (struct object *o, int action) } } -PMOD_EXPORT void visit_function (struct svalue *s, int ref_type) +PMOD_EXPORT void visit_function (const struct svalue *s, int ref_type) { #ifdef PIKE_DEBUG if (s->type != T_FUNCTION) diff --git a/src/object.h b/src/object.h index b7460f9a5a..1ed1622569 100644 --- a/src/object.h +++ b/src/object.h @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: object.h,v 1.98 2008/06/03 14:52:47 mast Exp $ +|| $Id: object.h,v 1.99 2010/04/19 13:50:11 mast Exp $ */ #ifndef OBJECT_H @@ -129,7 +129,7 @@ PMOD_EXPORT int object_equal_p(struct object *a, struct object *b, struct proces PMOD_EXPORT struct array *object_indices(struct object *o, int inherit_level); PMOD_EXPORT struct array *object_values(struct object *o, int inherit_level); PMOD_EXPORT void visit_object (struct object *o, int action); -PMOD_EXPORT void visit_function (struct svalue *s, int ref_type); +PMOD_EXPORT void visit_function (const struct svalue *s, int ref_type); PMOD_EXPORT void gc_mark_object_as_referenced(struct object *o); PMOD_EXPORT void real_gc_cycle_check_object(struct object *o, int weak); unsigned gc_touch_all_objects(void); -- GitLab