clover: Override ret_object.
Return an API object from an intrusive reference to a Clover object, incrementing the reference count of the object. Reviewed-by: Francisco Jerez <currojerez@riseup.net> Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
This commit is contained in:
parent
85309e8b55
commit
70fe6267a3
|
@ -68,6 +68,17 @@ namespace clover {
|
|||
*p = desc(v());
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
/// Return an API object from an intrusive reference to a Clover object,
|
||||
/// incrementing the reference count of the object.
|
||||
///
|
||||
template<typename T>
|
||||
typename T::descriptor_type *
|
||||
ret_object(const intrusive_ref<T> &v) {
|
||||
v().retain();
|
||||
return desc(v());
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue