diff options
author | Jesse Pavel <jpavel@src.gnome.org> | 2000-10-28 04:34:53 +0800 |
---|---|---|
committer | Jesse Pavel <jpavel@src.gnome.org> | 2000-10-28 04:34:53 +0800 |
commit | 7b8d4345fe3671e0d6fe0dab23ba1212d564a172 (patch) | |
tree | df97567630f49d4c55f599cce56b3b9bc2a53a1b | |
parent | 78a43af4b23250dc56e4a971915f274ab0da377d (diff) | |
download | gsoc2013-evolution-7b8d4345fe3671e0d6fe0dab23ba1212d564a172.tar gsoc2013-evolution-7b8d4345fe3671e0d6fe0dab23ba1212d564a172.tar.gz gsoc2013-evolution-7b8d4345fe3671e0d6fe0dab23ba1212d564a172.tar.bz2 gsoc2013-evolution-7b8d4345fe3671e0d6fe0dab23ba1212d564a172.tar.lz gsoc2013-evolution-7b8d4345fe3671e0d6fe0dab23ba1212d564a172.tar.xz gsoc2013-evolution-7b8d4345fe3671e0d6fe0dab23ba1212d564a172.tar.zst gsoc2013-evolution-7b8d4345fe3671e0d6fe0dab23ba1212d564a172.zip |
Fixed icalproperty_remove_parameter().
svn path=/trunk/; revision=6239
-rw-r--r-- | libical/ChangeLog | 5 | ||||
-rw-r--r-- | libical/src/libical/icalproperty.c | 19 |
2 files changed, 23 insertions, 1 deletions
diff --git a/libical/ChangeLog b/libical/ChangeLog index 4b077f01ee..8b902fd4a9 100644 --- a/libical/ChangeLog +++ b/libical/ChangeLog @@ -1,3 +1,8 @@ +2000-10-20 Jesse Pavel <jpavel@helixcode.com> + + * src/libical/icalproperty.c: added support for the + icalproperty_remove_parameter() function. + 2000-10-11 Damon Chaplin <damon@helixcode.com> * src/libical/icalparameter.c (icalparameter_as_ical_string): diff --git a/libical/src/libical/icalproperty.c b/libical/src/libical/icalproperty.c index 1040215108..b63c8a960a 100644 --- a/libical/src/libical/icalproperty.c +++ b/libical/src/libical/icalproperty.c @@ -382,9 +382,26 @@ icalproperty_add_parameter (icalproperty* prop,icalparameter* parameter) void icalproperty_remove_parameter (icalproperty* prop, icalparameter_kind kind) { + struct icalproperty_impl *p = (struct icalproperty_impl*)prop; + icalparameter *param; + pvl_elem elem; + icalerror_check_arg_rv((prop!=0),"prop"); - assert(0); /* This routine is not implemented */ + /* This routine is now implemented, so disregard the following + assertion. */ + /* assert(0); */ + + elem = pvl_head (p->parameters); + while (elem != NULL) { + param = (icalparameter *)pvl_data (elem); + if (icalparameter_isa (param) == kind) { + pvl_remove (p->parameters, elem); + icalparameter_free (param); + break; + } + elem = pvl_next (elem); + } } |