From: NeilBrown Date: Wed, 9 Dec 2015 09:48:05 +0000 (+1100) Subject: Mark the '42' hack in render-complete as such. X-Git-Tag: lca2016~96 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=5d33096962fc7eac9a606a657d69f435c6d3e437;p=edlib.git Mark the '42' hack in render-complete as such. And hide it from future attempts to make 'ci' read-only. Signed-off-by: NeilBrown --- diff --git a/render-complete.c b/render-complete.c index 49c51c94..32b7ae0d 100644 --- a/render-complete.c +++ b/render-complete.c @@ -170,7 +170,11 @@ DEF_CMD(render_complete_prev) break; } mark_free(ci3.mark); - ci->str2 = cb.str; + /* This is a horrible hack, but as it is entirely internal + * to this module it can say for now. + * Cast ci to remove any 'const' tag that I hope to add soon. + */ + ((struct cmd_info*)ci)->str2 = cb.str; if (cb.cmp == 0 && ci2.numeric == 1) /* This is a valid new start-of-line */