From: Lucas De M. <luc...@pr...> - 2010-07-10 15:30:23
|
On Sat, Jul 10, 2010 at 3:11 AM, Leif Middelschulte <lei...@gm...> wrote: > Hey, > > when reading part of EFL I also encountered those (forgotten?) const-keywords. > If you take 'type const name' vs. 'const type name' into account as > well, those misstakes are all over the place. What's the point of having a 'type const name' as argument in functions? You really want to be sure that the thing it points to will not be modified, not the pointer itself. > Somebody told me to not care too much about it, but I'd be with you > just because of 'correctness'. > But maybe this coccinelle stuff (lucas) can help us fixing this Coccinelle might be used for this, but what would be the pattern to search for? If this is simply a " find all getter functions and ensure it receives a const pointer", it'd would be feasible with a simple sed/perl script. Lucas De Marchi |