mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
get_opt_rec, get_opt_rec_real: Let name point to const.
This commit is contained in:
parent
33b2db7053
commit
3756bec9e0
@ -159,7 +159,7 @@ static int no_autocreate = 0;
|
||||
|
||||
/* Get record of option of given name, or NULL if there's no such option. */
|
||||
struct option *
|
||||
get_opt_rec(struct option *tree, unsigned char *name_)
|
||||
get_opt_rec(struct option *tree, const unsigned char *name_)
|
||||
{
|
||||
struct option *option;
|
||||
unsigned char *aname = stracpy(name_);
|
||||
@ -231,7 +231,7 @@ get_opt_rec(struct option *tree, unsigned char *name_)
|
||||
* do not create the option if it doesn't exist and there's autocreation
|
||||
* enabled. */
|
||||
struct option *
|
||||
get_opt_rec_real(struct option *tree, unsigned char *name)
|
||||
get_opt_rec_real(struct option *tree, const unsigned char *name)
|
||||
{
|
||||
struct option *opt;
|
||||
|
||||
|
@ -208,8 +208,8 @@ extern void checkout_option_values(struct option_resolver *resolvers,
|
||||
* use get_opt_type() and add_opt_type(). For command line options, you want to
|
||||
* use get_opt_type_tree(cmdline_options, "option"). */
|
||||
|
||||
extern struct option *get_opt_rec(struct option *, unsigned char *);
|
||||
extern struct option *get_opt_rec_real(struct option *, unsigned char *);
|
||||
extern struct option *get_opt_rec(struct option *, const unsigned char *);
|
||||
extern struct option *get_opt_rec_real(struct option *, const unsigned char *);
|
||||
#ifdef CONFIG_DEBUG
|
||||
extern union option_value *get_opt_(unsigned char *, int, enum option_type, struct option *, unsigned char *);
|
||||
#define get_opt(tree, name, type) get_opt_(__FILE__, __LINE__, type, tree, name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user