]> git.ozlabs.org Git - ccan/commit
opt: allow const arguments.
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 22 Mar 2011 01:18:43 +0000 (11:48 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 22 Mar 2011 01:18:43 +0000 (11:48 +1030)
commite34192d580958aaffff3754a4e2bf1eccbb489f8
treefab43e9baaab74f49360c198da41b415a0487425
parent66711021849dd07cd29383c9ed40ab4b9f3d1e07
opt: allow const arguments.

This need shows up most clearly with opt_usage_and_exit and gcc's
-Wwrite-strings, where string literals become "const char *".  Our
callbacks should take const void *: since we overload the arg field
already (to hold table size) it make sense to turn it into a proper
union.
ccan/opt/opt.c
ccan/opt/opt.h
ccan/opt/parse.c
ccan/opt/test/compile_ok-const-arg.c [new file with mode: 0644]
ccan/opt/usage.c