mirror of
https://gitlab.xiph.org/xiph/icecast-common.git
synced 2024-12-04 14:46:31 -05:00
Update: Pass instance to igloo_ro_clone_t, igloo_ro_convert_t, and igloo_ro_get_interface_t
This commit is contained in:
parent
02837785c3
commit
8ccb5c7b12
@ -88,7 +88,7 @@ typedef unsigned long int igloo_ro_cf_t;
|
||||
* name, associated
|
||||
* See igloo_ro_new().
|
||||
*/
|
||||
typedef igloo_ro_t (*igloo_ro_clone_t)(igloo_ro_t self, igloo_ro_cf_t required, igloo_ro_cf_t allowed, const char *name, igloo_ro_t associated);
|
||||
typedef igloo_ro_t (*igloo_ro_clone_t)(igloo_ro_t self, igloo_ro_cf_t required, igloo_ro_cf_t allowed, const char *name, igloo_ro_t associated, igloo_ro_t instance);
|
||||
|
||||
/* Type used for callback called when the object needs to be converted to another type.
|
||||
*
|
||||
@ -111,7 +111,7 @@ typedef igloo_ro_t (*igloo_ro_clone_t)(igloo_ro_t self, igloo_ro_cf_t required,
|
||||
* name, associated
|
||||
* See igloo_ro_new().
|
||||
*/
|
||||
typedef igloo_ro_t (*igloo_ro_convert_t)(igloo_ro_t self, const igloo_ro_type_t *type, igloo_ro_cf_t required, igloo_ro_cf_t allowed, const char *name, igloo_ro_t associated);
|
||||
typedef igloo_ro_t (*igloo_ro_convert_t)(igloo_ro_t self, const igloo_ro_type_t *type, igloo_ro_cf_t required, igloo_ro_cf_t allowed, const char *name, igloo_ro_t associated, igloo_ro_t instance);
|
||||
|
||||
/* Type used for callback called when a specific interface to the object is requested.
|
||||
*
|
||||
@ -129,7 +129,7 @@ typedef igloo_ro_t (*igloo_ro_convert_t)(igloo_ro_t self, const igloo_ro_type_t
|
||||
* name, associated
|
||||
* See igloo_ro_new().
|
||||
*/
|
||||
typedef igloo_ro_t (*igloo_ro_get_interface_t)(igloo_ro_t self, const igloo_ro_type_t *type, const char *name, igloo_ro_t associated);
|
||||
typedef igloo_ro_t (*igloo_ro_get_interface_t)(igloo_ro_t self, const igloo_ro_type_t *type, const char *name, igloo_ro_t associated, igloo_ro_t instance);
|
||||
|
||||
/* Type used to store flags for stringify operation.
|
||||
*/
|
||||
|
8
src/ro.c
8
src/ro.c
@ -367,7 +367,7 @@ igloo_ro_t igloo_ro_clone(igloo_ro_t self, igloo_ro_cf_t required, igloo_ro
|
||||
}
|
||||
|
||||
if (base->type->type_clonecb)
|
||||
ret = base->type->type_clonecb(self, required, allowed, name, associated);
|
||||
ret = base->type->type_clonecb(self, required, allowed, name, associated, base->instance);
|
||||
igloo_thread_mutex_unlock(&(base->lock));
|
||||
|
||||
return ret;
|
||||
@ -398,11 +398,11 @@ igloo_ro_t igloo_ro_convert(igloo_ro_t self, const igloo_ro_type_t *type, i
|
||||
allowed = igloo_RO_CF_DEFAULT;
|
||||
|
||||
if (base->type->type_convertcb)
|
||||
ret = base->type->type_convertcb(self, type, required, allowed, name, associated);
|
||||
ret = base->type->type_convertcb(self, type, required, allowed, name, associated, base->instance);
|
||||
|
||||
if (igloo_RO_IS_NULL(ret))
|
||||
if (type->type_convertcb)
|
||||
ret = type->type_convertcb(self, type, required, allowed, name, associated);
|
||||
ret = type->type_convertcb(self, type, required, allowed, name, associated, base->instance);
|
||||
igloo_thread_mutex_unlock(&(base->lock));
|
||||
|
||||
return ret;
|
||||
@ -428,7 +428,7 @@ igloo_ro_t igloo_ro_get_interface_ext(igloo_ro_t self, const igloo_ro_type_t *ty
|
||||
igloo_thread_mutex_unlock(&(base->lock));
|
||||
|
||||
if (base->type->type_get_interfacecb)
|
||||
ret = base->type->type_get_interfacecb(self, type, name, associated);
|
||||
ret = base->type->type_get_interfacecb(self, type, name, associated, base->instance);
|
||||
|
||||
igloo_thread_mutex_lock(&(base->lock));
|
||||
/* remove temp reference
|
||||
|
Loading…
Reference in New Issue
Block a user