icalproperty *icalprop = icalproperty_new((icalproperty_kind)kind); if (!icalprop) return NS_ERROR_OUT_OF_MEMORY; *prop = new calIcalProperty(icalprop, this); if (!*prop) return NS_ERROR_OUT_OF_MEMORY; NS_ADDREF(*prop);
calIcalProperty *ical = NS_STATIC_CAST(calIcalProperty *, prop); icalcomponent_add_property(mComponent, ical->mProperty); ical->mParent = this;
calIcalComponent::AddProperty(PRInt32 kind, calIIcalProperty **prop){    icalproperty *icalprop = icalproperty_new((icalproperty_kind)kind);    if (!icalprop)        return NS_ERROR_OUT_OF_MEMORY; // XXX translate    *prop = new calIcalProperty(icalprop, this);    if (!*prop)        return NS_ERROR_OUT_OF_MEMORY;    NS_ADDREF(*prop);    return NS_OK;}