Constify the tool interface.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14642 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/helgrind/hg_errors.c b/helgrind/hg_errors.c
index fc33bed..0e96d7e 100644
--- a/helgrind/hg_errors.c
+++ b/helgrind/hg_errors.c
@@ -371,7 +371,7 @@
/* Updates the copy with address info if necessary. */
-UInt HG_(update_extra) ( Error* err )
+UInt HG_(update_extra) ( const Error* err )
{
XError* xe = (XError*)VG_(get_error_extra)(err);
tl_assert(xe);
@@ -637,7 +637,7 @@
HG_(record_error_Misc_w_aux)(thr, errstr, NULL, NULL);
}
-Bool HG_(eq_Error) ( VgRes not_used, Error* e1, Error* e2 )
+Bool HG_(eq_Error) ( VgRes not_used, const Error* e1, const Error* e2 )
{
XError *xe1, *xe2;
@@ -843,7 +843,7 @@
announce any previously un-announced threads in the upcoming error
message.
*/
-void HG_(before_pp_Error) ( Error* err )
+void HG_(before_pp_Error) ( const Error* err )
{
XError* xe;
tl_assert(err);
@@ -893,7 +893,7 @@
}
}
-void HG_(pp_Error) ( Error* err )
+void HG_(pp_Error) ( const Error* err )
{
const Bool xml = VG_(clo_xml); /* a shorthand, that's all */
@@ -1252,7 +1252,7 @@
} /* switch (VG_(get_error_kind)(err)) */
}
-const HChar* HG_(get_error_name) ( Error* err )
+const HChar* HG_(get_error_name) ( const Error* err )
{
switch (VG_(get_error_kind)(err)) {
case XE_Race: return "Race";
@@ -1293,7 +1293,7 @@
return True;
}
-Bool HG_(error_matches_suppression) ( Error* err, Supp* su )
+Bool HG_(error_matches_suppression) ( const Error* err, const Supp* su )
{
switch (VG_(get_supp_kind)(su)) {
case XS_Race: return VG_(get_error_kind)(err) == XE_Race;
@@ -1308,7 +1308,7 @@
}
}
-SizeT HG_(get_extra_suppression_info) ( Error* err,
+SizeT HG_(get_extra_suppression_info) ( const Error* err,
/*OUT*/HChar* buf, Int nBuf )
{
tl_assert(nBuf >= 1);
@@ -1317,7 +1317,7 @@
return 0;
}
-SizeT HG_(print_extra_suppression_use) ( Supp* su,
+SizeT HG_(print_extra_suppression_use) ( const Supp* su,
/*OUT*/HChar* buf, Int nBuf )
{
tl_assert(nBuf >= 1);
@@ -1326,7 +1326,7 @@
return 0;
}
-void HG_(update_extra_suppression_use) ( Error* err, Supp* su )
+void HG_(update_extra_suppression_use) ( const Error* err, const Supp* su )
{
/* Do nothing */
return;