comparison src/status.c @ 10507:05081f488da1

[gaim-migrate @ 11801] this makes more sense to me committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Wed, 12 Jan 2005 05:22:46 +0000
parents 1a97d5e88d12
children bec9130b24d2
comparison
equal deleted inserted replaced
10506:4f67724c207c 10507:05081f488da1
1009 int 1009 int
1010 gaim_status_get_attr_int(const GaimStatus *status, const char *id) 1010 gaim_status_get_attr_int(const GaimStatus *status, const char *id)
1011 { 1011 {
1012 const GaimValue *value; 1012 const GaimValue *value;
1013 1013
1014 g_return_val_if_fail(status != NULL, FALSE); 1014 g_return_val_if_fail(status != NULL, 0);
1015 g_return_val_if_fail(id != NULL, FALSE); 1015 g_return_val_if_fail(id != NULL, 0);
1016 1016
1017 if ((value = gaim_status_get_attr_value(status, id)) == NULL) 1017 if ((value = gaim_status_get_attr_value(status, id)) == NULL)
1018 return FALSE; 1018 return 0;
1019 1019
1020 g_return_val_if_fail(gaim_value_get_type(value) == GAIM_TYPE_INT, 0); 1020 g_return_val_if_fail(gaim_value_get_type(value) == GAIM_TYPE_INT, 0);
1021 1021
1022 return gaim_value_get_int(value); 1022 return gaim_value_get_int(value);
1023 } 1023 }
1025 const char * 1025 const char *
1026 gaim_status_get_attr_string(const GaimStatus *status, const char *id) 1026 gaim_status_get_attr_string(const GaimStatus *status, const char *id)
1027 { 1027 {
1028 const GaimValue *value; 1028 const GaimValue *value;
1029 1029
1030 g_return_val_if_fail(status != NULL, FALSE); 1030 g_return_val_if_fail(status != NULL, NULL);
1031 g_return_val_if_fail(id != NULL, FALSE); 1031 g_return_val_if_fail(id != NULL, NULL);
1032 1032
1033 if ((value = gaim_status_get_attr_value(status, id)) == NULL) 1033 if ((value = gaim_status_get_attr_value(status, id)) == NULL)
1034 return NULL; 1034 return NULL;
1035 1035
1036 g_return_val_if_fail(gaim_value_get_type(value) == GAIM_TYPE_STRING, NULL); 1036 g_return_val_if_fail(gaim_value_get_type(value) == GAIM_TYPE_STRING, NULL);