libnm-core: team: change tx-hash APIs idx type from int to guint

(cherry picked from commit 4c7a841823)
This commit is contained in:
Francesco Giudici 2017-12-06 23:15:07 +01:00
parent 5d79b6cc42
commit 4525b7e208
2 changed files with 6 additions and 6 deletions

View file

@ -927,12 +927,12 @@ nm_setting_team_get_num_runner_tx_hash (NMSettingTeam *setting)
* Since: 1.10.2
**/
const char *
nm_setting_team_get_runner_tx_hash (NMSettingTeam *setting, int idx)
nm_setting_team_get_runner_tx_hash (NMSettingTeam *setting, guint idx)
{
NMSettingTeamPrivate *priv = NM_SETTING_TEAM_GET_PRIVATE (setting);
g_return_val_if_fail (NM_IS_SETTING_TEAM (setting), NULL);
g_return_val_if_fail (idx >= 0 && idx < priv->runner_tx_hash->len, NULL);
g_return_val_if_fail (idx < priv->runner_tx_hash->len, NULL);
return priv->runner_tx_hash->pdata[idx];
}
@ -947,12 +947,12 @@ nm_setting_team_get_runner_tx_hash (NMSettingTeam *setting, int idx)
* Since: 1.10.2
**/
void
nm_setting_team_remove_runner_tx_hash (NMSettingTeam *setting, int idx)
nm_setting_team_remove_runner_tx_hash (NMSettingTeam *setting, guint idx)
{
NMSettingTeamPrivate *priv = NM_SETTING_TEAM_GET_PRIVATE (setting);
g_return_if_fail (NM_IS_SETTING_TEAM (setting));
g_return_if_fail (idx >= 0 && idx < priv->runner_tx_hash->len);
g_return_if_fail (idx < priv->runner_tx_hash->len);
g_ptr_array_remove_index (priv->runner_tx_hash, idx);
g_object_notify (G_OBJECT (setting), NM_SETTING_TEAM_RUNNER_TX_HASH);

View file

@ -206,9 +206,9 @@ gboolean nm_setting_team_remove_runner_tx_hash_by_value (NMSettingTeam *setting,
NM_AVAILABLE_IN_1_10_2
guint nm_setting_team_get_num_runner_tx_hash (NMSettingTeam *setting);
NM_AVAILABLE_IN_1_10_2
const char *nm_setting_team_get_runner_tx_hash (NMSettingTeam *setting, int idx);
const char *nm_setting_team_get_runner_tx_hash (NMSettingTeam *setting, guint idx);
NM_AVAILABLE_IN_1_10_2
void nm_setting_team_remove_runner_tx_hash (NMSettingTeam *setting, int idx);
void nm_setting_team_remove_runner_tx_hash (NMSettingTeam *setting, guint idx);
NM_AVAILABLE_IN_1_10_2
gboolean nm_setting_team_add_runner_tx_hash (NMSettingTeam *setting, const char *txhash);
NM_AVAILABLE_IN_1_10_2