fx: string: implement iterator destructor
This commit is contained in:
+3
-3
@@ -1574,10 +1574,9 @@ static fx_status get_length(
|
||||
|
||||
/*** ITERATOR FUNCTIONS *******************************************************/
|
||||
|
||||
static void iterator_fini(fx_iterator *obj)
|
||||
static void iterator_fini(fx_object *obj, void *priv)
|
||||
{
|
||||
struct fx_string_iterator_p *it
|
||||
= fx_object_get_private(obj, FX_TYPE_STRING_ITERATOR);
|
||||
struct fx_string_iterator_p *it = priv;
|
||||
if (it->_tmp) {
|
||||
fx_string_unref(it->_tmp);
|
||||
}
|
||||
@@ -1840,4 +1839,5 @@ FX_TYPE_DEFINITION_BEGIN(fx_string_iterator)
|
||||
FX_TYPE_EXTENDS(FX_TYPE_ITERATOR);
|
||||
FX_TYPE_CLASS(fx_string_iterator_class);
|
||||
FX_TYPE_INSTANCE_PRIVATE(struct fx_string_iterator_p);
|
||||
FX_TYPE_INSTANCE_FINI(iterator_fini);
|
||||
FX_TYPE_DEFINITION_END(fx_string_iterator)
|
||||
|
||||
Reference in New Issue
Block a user