dbghelp: Constify some variables

Andrew Talbot Andrew.Talbot at talbotville.com
Tue Apr 17 17:19:45 CDT 2007


Changelog:
    dbghelp: Constify some variables.

diff -urN a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c
--- a/dlls/dbghelp/dwarf.c	2007-03-16 12:22:00.000000000 +0000
+++ b/dlls/dbghelp/dwarf.c	2007-04-16 21:59:39.000000000 +0100
@@ -342,7 +342,7 @@
 }
 
 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 @@
 }
 
 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 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 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_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_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_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_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 -urN a/dlls/dbghelp/minidump.c b/dlls/dbghelp/minidump.c
--- a/dlls/dbghelp/minidump.c	2007-02-22 11:58:24.000000000 +0000
+++ b/dlls/dbghelp/minidump.c	2007-04-17 21:25:07.000000000 +0100
@@ -112,7 +112,7 @@
     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 @@
  *
  * 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 -urN a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c
--- a/dlls/dbghelp/module.c	2007-03-15 13:20:49.000000000 +0000
+++ b/dlls/dbghelp/module.c	2007-04-17 21:29:52.000000000 +0100
@@ -368,7 +368,7 @@
  * 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-patches mailing list