/** * \brief Attach an HCTL element to a mixer element * \param melem Mixer element * \param helem HCTL element * \return 0 on success otherwise a negative error code * * For use by mixer element class specific code. */ int snd_mixer_elem_attach(snd_mixer_elem_t *melem, snd_hctl_elem_t *helem) { bag_t *bag = snd_hctl_elem_get_callback_private(helem); int err; err = bag_add(bag, melem); if (err < 0) return err; return bag_add(&melem->helems, helem); }
Failable_string* failable_string_create(failableID id) { Failable_string* this = alloct(Failable_string); /// this [+1] bag_add( failable_config.strings_bag, id, this ); ref(this, this->dependents = lvector_create()); /// this->dependents+ + release(this->dependents); /// this->dependents- ref(this, this->hooks = wtree_create()); /// this->hooks+ + release(this->hooks); /// this->hooks- this->hooksum = 0; ref(this, this->flag = tflag_create()); /// this->flag+ + release(this->flag); /// this->flag- return this; /// this [+1] }