mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-06-19 04:18:30 +02:00
cli: make nmc_meta_environment_arg const pointer
Of course, we later pass the point on, where we need to cast the constness away again. This is more a reminder that we aren't suppost to change the variable.
This commit is contained in:
parent
873f4795b2
commit
7627173c0e
4 changed files with 8 additions and 8 deletions
|
|
@ -3842,7 +3842,7 @@ _meta_abstract_complete (const NMMetaAbstractInfo *abstract_info, const char *te
|
|||
|
||||
values = nm_meta_abstract_info_complete (abstract_info,
|
||||
nmc_meta_environment,
|
||||
nmc_meta_environment_arg,
|
||||
(gpointer) nmc_meta_environment_arg,
|
||||
&ctx,
|
||||
text,
|
||||
NULL,
|
||||
|
|
@ -4642,7 +4642,7 @@ complete_option (NmCli *nmc, const NMMetaAbstractInfo *abstract_info, const char
|
|||
|
||||
values = nm_meta_abstract_info_complete (abstract_info,
|
||||
nmc_meta_environment,
|
||||
nmc_meta_environment_arg,
|
||||
(gpointer) nmc_meta_environment_arg,
|
||||
&ctx,
|
||||
prefix,
|
||||
&complete_filename,
|
||||
|
|
|
|||
|
|
@ -456,7 +456,7 @@ const NMMetaEnvironment *const nmc_meta_environment = &((NMMetaEnvironment) {
|
|||
.get_nm_connections = _env_get_nm_connections,
|
||||
});
|
||||
|
||||
NmCli *const nmc_meta_environment_arg = &nm_cli;
|
||||
const NmCli *const nmc_meta_environment_arg = &nm_cli;
|
||||
|
||||
static char *
|
||||
get_property_val (NMSetting *setting, const char *prop, NMMetaAccessorGetType get_type, gboolean show_secrets, GError **error)
|
||||
|
|
@ -475,7 +475,7 @@ get_property_val (NMSetting *setting, const char *prop, NMMetaAccessorGetType ge
|
|||
|
||||
value = property_info->property_type->get_fcn (property_info,
|
||||
nmc_meta_environment,
|
||||
nmc_meta_environment_arg,
|
||||
(gpointer) nmc_meta_environment_arg,
|
||||
setting,
|
||||
get_type,
|
||||
show_secrets ? NM_META_ACCESSOR_GET_FLAGS_SHOW_SECRETS : 0,
|
||||
|
|
@ -568,7 +568,7 @@ nmc_setting_set_property (NMClient *client,
|
|||
g_object_freeze_notify (G_OBJECT (setting));
|
||||
success = property_info->property_type->set_fcn (property_info,
|
||||
nmc_meta_environment,
|
||||
nmc_meta_environment_arg,
|
||||
(gpointer) nmc_meta_environment_arg,
|
||||
setting,
|
||||
modifier,
|
||||
value,
|
||||
|
|
|
|||
|
|
@ -1067,7 +1067,7 @@ _print_fill (const NmcConfig *nmc_config,
|
|||
|
||||
value = nm_meta_abstract_info_get (info,
|
||||
nmc_meta_environment,
|
||||
nmc_meta_environment_arg,
|
||||
(gpointer) nmc_meta_environment_arg,
|
||||
target,
|
||||
targets_data,
|
||||
text_get_type,
|
||||
|
|
@ -1112,7 +1112,7 @@ _print_fill (const NmcConfig *nmc_config,
|
|||
|
||||
cell->color = GPOINTER_TO_INT (nm_meta_abstract_info_get (info,
|
||||
nmc_meta_environment,
|
||||
nmc_meta_environment_arg,
|
||||
(gpointer) nmc_meta_environment_arg,
|
||||
target,
|
||||
targets_data,
|
||||
NM_META_ACCESSOR_GET_TYPE_COLOR,
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ void print_data (const NmcConfig *nmc_config,
|
|||
/*****************************************************************************/
|
||||
|
||||
extern const NMMetaEnvironment *const nmc_meta_environment;
|
||||
extern NmCli *const nmc_meta_environment_arg;
|
||||
extern const NmCli *const nmc_meta_environment_arg;
|
||||
|
||||
typedef enum {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue