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);
void* vector_at(const struct vector* v, unsigned pos);
void* vector_add(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_down(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, const void* elt);
struct sparse_array
{
......@@ -557,10 +557,10 @@ extern struct symt_function_point*
enum SymTagEnum point,
const struct location* loc,
const char* name);
extern BOOL symt_fill_func_line_info(struct module* module,
struct symt_function* func,
extern BOOL symt_fill_func_line_info(const struct module* module,
const struct symt_function* func,
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*
symt_new_thunk(struct module* module,
struct symt_compiland* parent,
......
......@@ -101,13 +101,13 @@ void* pool_alloc(struct pool* pool, unsigned len)
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;
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;
}
......@@ -206,7 +206,7 @@ static unsigned vector_position(const struct vector* v, const void* elt)
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;
......@@ -216,7 +216,7 @@ void* vector_iter_up(const struct vector* v, void* elt)
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;
if (!elt) return vector_at(v, vector_length(v) - 1);
......
......@@ -612,7 +612,7 @@ struct sym_enum
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)
{
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,
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)
{
void* ptr;
......@@ -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,
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* lsym = NULL;
......@@ -1223,7 +1223,7 @@ BOOL WINAPI SymGetSymFromName(HANDLE hProcess, PCSTR Name, PIMAGEHLP_SYMBOL Symb
*
* 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)
{
struct line_info* dli = NULL;
......@@ -1450,7 +1450,7 @@ BOOL WINAPI SymGetLinePrev64(HANDLE hProcess, PIMAGEHLP_LINE64 Line)
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;
......
......@@ -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,
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