Remove an optional structure field or vector element. Note that this function is deprecated and replaced with
mco_uda_field_erase().
MCO_RET mco_uda_field_free( /*IN*/ const mco_uda_object_handle_p obj,
/*IN*/ unsigned short field_no,
/*IN*/ unsigned short index );
obj
field_no
struct_info.field_count - 1).index
Remove an optional structure field or vector element.
MCO_S_OK
field_no - field not found in this class or struct.MCO_E_UDA_NOT_DYNAMIC
Application snippet:
int main(int argc, char* argv[])
{
MCO_RET rc;
mco_uda_object_handle_t obj;
mco_uda_value_t val;
unsigned short optional_field_no = 1;
...
mco_uda_field_free(&obj, optional_field_no, 0); /* Free allocated vector */
...
}