]> git.neil.brown.name Git - edlib.git/commitdiff
Mark the '42' hack in render-complete as such.
authorNeilBrown <neil@brown.name>
Wed, 9 Dec 2015 09:48:05 +0000 (20:48 +1100)
committerNeilBrown <neil@brown.name>
Thu, 10 Dec 2015 02:54:09 +0000 (13:54 +1100)
And hide it from future attempts to make 'ci' read-only.

Signed-off-by: NeilBrown <neil@brown.name>
render-complete.c

index 49c51c940be12aa8fcc9d21b7aedabf391c12fcc..32b7ae0dee96d5d6d89866e38e1e3b63e2215d35 100644 (file)
@@ -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 */