Andrew Talbot : dbghelp: Constify some variables.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Apr 18 06:58:45 CDT 2007


Module: wine
Branch: master
Commit: 099bb87feb6e09571520b0da30b76898c66dfc14
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=099bb87feb6e09571520b0da30b76898c66dfc14

Author: Andrew Talbot <Andrew.Talbot at talbotville.com>
Date:   Tue Apr 17 23:19:45 2007 +0100

dbghelp: Constify some variables.

---

 dlls/dbghelp/dwarf.c    |   18 +++++++++---------
 dlls/dbghelp/minidump.c |    4 ++--
 dlls/dbghelp/module.c   |    2 +-
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c
index 1219522..45fe854 100644
--- a/dlls/dbghelp/dwarf.c
+++ b/dlls/dbghelp/dwarf.c
@@ -342,7 +342,7 @@ static const char* dwarf2_debug_di(const dwarf2_debug_info_t* di)
 }
 
 static dwarf2_abbrev_entry_t*
-dwarf2_abbrev_table_find_entry(struct sparse_array* abbrev_table,
+dwarf2_abbrev_table_find_entry(const struct sparse_array* abbrev_table,
                                unsigned long entry_code)
 {
     assert( NULL != abbrev_table );
@@ -782,7 +782,7 @@ compute_location(dwarf2_traverse_context_t* ctx, struct location* loc,
 }
 
 static BOOL dwarf2_compute_location_attr(dwarf2_parse_context_t* ctx,
-                                         dwarf2_debug_info_t* di,
+                                         const dwarf2_debug_info_t* di,
                                          unsigned long dw,
                                          struct location* loc,
                                          const struct location* frame)
@@ -1095,7 +1095,7 @@ static struct symt* dwarf2_parse_reference_type(dwarf2_parse_context_t* ctx,
 }
 
 static void dwarf2_parse_udt_member(dwarf2_parse_context_t* ctx,
-                                    dwarf2_debug_info_t* di,
+                                    const dwarf2_debug_info_t* di,
                                     struct symt_udt* parent)
 {
     struct symt* elt_type;
@@ -1197,7 +1197,7 @@ static struct symt* dwarf2_parse_udt_type(dwarf2_parse_context_t* ctx,
 }
 
 static void dwarf2_parse_enumerator(dwarf2_parse_context_t* ctx,
-                                    dwarf2_debug_info_t* di,
+                                    const dwarf2_debug_info_t* di,
                                     struct symt_enum* parent)
 {
     struct attribute    name;
@@ -1372,7 +1372,7 @@ static void dwarf2_parse_variable(dwarf2_subprogram_t* subpgm,
 }
 
 static void dwarf2_parse_subprogram_label(dwarf2_subprogram_t* subpgm,
-                                          dwarf2_debug_info_t* di)
+                                          const dwarf2_debug_info_t* di)
 {
     struct attribute    name;
     struct attribute    low_pc;
@@ -1392,11 +1392,11 @@ static void dwarf2_parse_subprogram_label(dwarf2_subprogram_t* subpgm,
 
 static void dwarf2_parse_subprogram_block(dwarf2_subprogram_t* subpgm,
                                           struct symt_block* parent_block,
-					  dwarf2_debug_info_t* di);
+					  const dwarf2_debug_info_t* di);
 
 static void dwarf2_parse_inlined_subroutine(dwarf2_subprogram_t* subpgm,
                                             struct symt_block* parent_block,
-                                            dwarf2_debug_info_t* di)
+                                            const dwarf2_debug_info_t* di)
 {
     struct symt_block*  block;
     struct attribute    low_pc;
@@ -1447,7 +1447,7 @@ static void dwarf2_parse_inlined_subroutine(dwarf2_subprogram_t* subpgm,
 
 static void dwarf2_parse_subprogram_block(dwarf2_subprogram_t* subpgm, 
                                           struct symt_block* parent_block,
-					  dwarf2_debug_info_t* di)
+					  const dwarf2_debug_info_t* di)
 {
     struct symt_block*  block;
     struct attribute    low_pc;
@@ -1743,7 +1743,7 @@ static void dwarf2_load_one_entry(dwarf2_parse_context_t* ctx,
 }
 
 static void dwarf2_set_line_number(struct module* module, unsigned long address,
-                                   struct vector* v, unsigned file, unsigned line)
+                                   const struct vector* v, unsigned file, unsigned line)
 {
     struct symt_function*       func;
     struct symt_ht*             symt;
diff --git a/dlls/dbghelp/minidump.c b/dlls/dbghelp/minidump.c
index 7c3ec6f..e2b034f 100644
--- a/dlls/dbghelp/minidump.c
+++ b/dlls/dbghelp/minidump.c
@@ -112,7 +112,7 @@ static BOOL fetch_process_info(struct dump_context* dc)
     return FALSE;
 }
 
-static void fetch_thread_stack(struct dump_context* dc, void* teb_addr,
+static void fetch_thread_stack(struct dump_context* dc, const void* teb_addr,
                                const CONTEXT* ctx, MINIDUMP_MEMORY_DESCRIPTOR* mmd)
 {
     NT_TIB      tib;
@@ -327,7 +327,7 @@ static void add_memory_block(struct dump_context* dc, ULONG64 base, ULONG size,
  *
  * Writes a chunk of data at a given position in the minidump
  */
-static void writeat(struct dump_context* dc, RVA rva, void* data, unsigned size)
+static void writeat(struct dump_context* dc, RVA rva, const void* data, unsigned size)
 {
     DWORD       written;
 
diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c
index 5b8718d..21c8830 100644
--- a/dlls/dbghelp/module.c
+++ b/dlls/dbghelp/module.c
@@ -368,7 +368,7 @@ struct module* module_find_by_addr(const struct process* pcs, unsigned long addr
  * checks whether the ELF container, for a (supposed) PE builtin is
  * already loaded
  */
-static BOOL module_is_elf_container_loaded(struct process* pcs,
+static BOOL module_is_elf_container_loaded(const struct process* pcs,
                                            const WCHAR* ImageName, DWORD base)
 {
     size_t              len;




More information about the wine-cvs mailing list