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 | The object handle |
|
field_no |
The field number (must be between 0 and |
|
index |
The index of the element in a vector |
Remove an optional structure field or vector element..
| MCO_S_OK | Field successfully freed |
| MCO_E_UDA_FIELD_NOT_FOUND |
Invalid |
|
MCO_E_UDA_NOT_DYNAMIC |
The field is not a vector or optional structure |
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 */
...
}