Closed dnbaker closed 5 years ago
It's a small change, but I'd simply like to request that char *p here (https://github.com/attractivechaos/klib/blob/master/ketopt.h#L92) be replaced with const char *p to allow compilation with C++ because of its stricter perspective on const-correctness.
char *p
const char *p
Example compiler output:
klib/ketopt.h: In function ‘int ketopt(ketopt_t*, int, char**, int, const char*, const ko_longopt_t*)’: klib/ketopt.h:95:13: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive] p = strchr(ostr, opt);
Thank you!
Please send a pull request. I will merge. Thanks!
It's a small change, but I'd simply like to request that
char *p
here (https://github.com/attractivechaos/klib/blob/master/ketopt.h#L92) be replaced withconst char *p
to allow compilation with C++ because of its stricter perspective on const-correctness.Example compiler output:
Thank you!