Commit a224fdb1 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

dbghelp: Constify some variables.

parent d5b2a0c3
...@@ -62,8 +62,8 @@ unsigned vector_length(const struct vector* v); ...@@ -62,8 +62,8 @@ unsigned vector_length(const struct vector* v);
void* vector_at(const struct vector* v, unsigned pos); void* vector_at(const struct vector* v, unsigned pos);
void* vector_add(struct vector* v, struct pool* pool); void* vector_add(struct vector* v, struct pool* pool);
/*void vector_pool_normalize(struct vector* v, struct pool* pool); */ /*void vector_pool_normalize(struct vector* v, struct pool* pool); */
void* vector_iter_up(const struct vector* v, void* elt); void* vector_iter_up(const struct vector* v, const void* elt);
void* vector_iter_down(const struct vector* v, void* elt); void* vector_iter_down(const struct vector* v, const void* elt);
struct sparse_array struct sparse_array
{ {
...@@ -557,10 +557,10 @@ extern struct symt_function_point* ...@@ -557,10 +557,10 @@ extern struct symt_function_point*
enum SymTagEnum point, enum SymTagEnum point,
const struct location* loc, const struct location* loc,
const char* name); const char* name);
extern BOOL symt_fill_func_line_info(struct module* module, extern BOOL symt_fill_func_line_info(const struct module* module,
struct symt_function* func, const struct symt_function* func,
DWORD addr, IMAGEHLP_LINE* line); DWORD addr, IMAGEHLP_LINE* line);
extern BOOL symt_get_func_line_next(struct module* module, PIMAGEHLP_LINE line); extern BOOL symt_get_func_line_next(const struct module* module, PIMAGEHLP_LINE line);
extern struct symt_thunk* extern struct symt_thunk*
symt_new_thunk(struct module* module, symt_new_thunk(struct module* module,
struct symt_compiland* parent, struct symt_compiland* parent,
......
...@@ -101,13 +101,13 @@ void* pool_alloc(struct pool* pool, unsigned len) ...@@ -101,13 +101,13 @@ void* pool_alloc(struct pool* pool, unsigned len)
return ret; return ret;
} }
static struct pool_arena* pool_is_last(struct pool* pool, void* p, unsigned old_size) static struct pool_arena* pool_is_last(const struct pool* pool, const void* p, unsigned old_size)
{ {
struct pool_arena* arena; struct pool_arena* arena;
for (arena = pool->first; arena; arena = arena->next) for (arena = pool->first; arena; arena = arena->next)
{ {
if (arena->current == (char*)p + old_size) return arena; if (arena->current == (const char*)p + old_size) return arena;
} }
return NULL; return NULL;
} }
...@@ -206,7 +206,7 @@ static unsigned vector_position(const struct vector* v, const void* elt) ...@@ -206,7 +206,7 @@ static unsigned vector_position(const struct vector* v, const void* elt)
return 0; return 0;
} }
void* vector_iter_up(const struct vector* v, void* elt) void* vector_iter_up(const struct vector* v, const void* elt)
{ {
unsigned pos; unsigned pos;
...@@ -216,7 +216,7 @@ void* vector_iter_up(const struct vector* v, void* elt) ...@@ -216,7 +216,7 @@ void* vector_iter_up(const struct vector* v, void* elt)
return vector_at(v, pos); return vector_at(v, pos);
} }
void* vector_iter_down(const struct vector* v, void* elt) void* vector_iter_down(const struct vector* v, const void* elt)
{ {
unsigned pos; unsigned pos;
if (!elt) return vector_at(v, vector_length(v) - 1); if (!elt) return vector_at(v, vector_length(v) - 1);
......
...@@ -612,7 +612,7 @@ struct sym_enum ...@@ -612,7 +612,7 @@ struct sym_enum
char buffer[sizeof(SYMBOL_INFO) + MAX_SYM_NAME]; char buffer[sizeof(SYMBOL_INFO) + MAX_SYM_NAME];
}; };
static BOOL send_symbol(const struct sym_enum* se, struct module_pair* pair, static BOOL send_symbol(const struct sym_enum* se, const struct module_pair* pair,
const struct symt_function* func, const struct symt* sym) const struct symt_function* func, const struct symt* sym)
{ {
symt_fill_sym_info(pair, func, sym, se->sym_info); symt_fill_sym_info(pair, func, sym, se->sym_info);
...@@ -622,7 +622,7 @@ static BOOL send_symbol(const struct sym_enum* se, struct module_pair* pair, ...@@ -622,7 +622,7 @@ static BOOL send_symbol(const struct sym_enum* se, struct module_pair* pair,
return !se->cb(se->sym_info, se->sym_info->Size, se->user); return !se->cb(se->sym_info, se->sym_info->Size, se->user);
} }
static BOOL symt_enum_module(struct module_pair* pair, regex_t* regex, static BOOL symt_enum_module(struct module_pair* pair, const regex_t* regex,
const struct sym_enum* se) const struct sym_enum* se)
{ {
void* ptr; void* ptr;
...@@ -752,7 +752,7 @@ struct symt_ht* symt_find_nearest(struct module* module, DWORD addr) ...@@ -752,7 +752,7 @@ struct symt_ht* symt_find_nearest(struct module* module, DWORD addr)
static BOOL symt_enum_locals_helper(struct module_pair* pair, static BOOL symt_enum_locals_helper(struct module_pair* pair,
regex_t* preg, const struct sym_enum* se, regex_t* preg, const struct sym_enum* se,
struct symt_function* func, struct vector* v) struct symt_function* func, const struct vector* v)
{ {
struct symt** plsym = NULL; struct symt** plsym = NULL;
struct symt* lsym = NULL; struct symt* lsym = NULL;
...@@ -1223,7 +1223,7 @@ BOOL WINAPI SymGetSymFromName(HANDLE hProcess, PCSTR Name, PIMAGEHLP_SYMBOL Symb ...@@ -1223,7 +1223,7 @@ BOOL WINAPI SymGetSymFromName(HANDLE hProcess, PCSTR Name, PIMAGEHLP_SYMBOL Symb
* *
* fills information about a file * fills information about a file
*/ */
BOOL symt_fill_func_line_info(struct module* module, struct symt_function* func, BOOL symt_fill_func_line_info(const struct module* module, const struct symt_function* func,
DWORD addr, IMAGEHLP_LINE* line) DWORD addr, IMAGEHLP_LINE* line)
{ {
struct line_info* dli = NULL; struct line_info* dli = NULL;
...@@ -1450,7 +1450,7 @@ BOOL WINAPI SymGetLinePrev64(HANDLE hProcess, PIMAGEHLP_LINE64 Line) ...@@ -1450,7 +1450,7 @@ BOOL WINAPI SymGetLinePrev64(HANDLE hProcess, PIMAGEHLP_LINE64 Line)
return TRUE; return TRUE;
} }
BOOL symt_get_func_line_next(struct module* module, PIMAGEHLP_LINE line) BOOL symt_get_func_line_next(const struct module* module, PIMAGEHLP_LINE line)
{ {
struct line_info* li; struct line_info* li;
......
...@@ -100,7 +100,7 @@ const char* symt_get_name(const struct symt* sym) ...@@ -100,7 +100,7 @@ const char* symt_get_name(const struct symt* sym)
} }
} }
static struct symt* symt_find_type_by_name(struct module* module, static struct symt* symt_find_type_by_name(const struct module* module,
enum SymTagEnum sym_tag, enum SymTagEnum sym_tag,
const char* typename) const char* typename)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment