[CLASSES]: Constify print routines class parameter

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2006-12-18 09:29:41 -02:00
parent 8330d47a1a
commit e70860fe11
2 changed files with 4 additions and 4 deletions

View File

@ -360,7 +360,7 @@ static uint64_t class__size(const struct class *self)
return size;
}
static const char *class__name(struct class *self, char *bf, size_t len)
static const char *class__name(const struct class *self, char *bf, size_t len)
{
if (self->tag.tag == DW_TAG_pointer_type) {
if (self->tag.type == 0) /* No type == void */
@ -1022,7 +1022,7 @@ static int class__print_cacheline_boundary(uint32_t last_cacheline,
return cacheline;
}
static void class__print_struct(struct class *self)
static void class__print_struct(const struct class *self)
{
unsigned long sum = 0;
unsigned long sum_holes = 0;
@ -1148,7 +1148,7 @@ static void class__print_struct(struct class *self)
putchar('\n');
}
void class__print(struct class *self)
void class__print(const struct class *self)
{
printf("/* %s:%u */\n", self->tag.decl_file, self->tag.decl_line);

View File

@ -139,7 +139,7 @@ struct label {
#define DEFAULT_CACHELINE_SIZE 32
extern void class__find_holes(struct class *self);
extern void class__print(struct class *self);
extern void class__print(const struct class *self);
extern void function__print(const struct function *self, int show_stats,
const int show_variables,
const int show_inline_expansions);