void VALclear(ValPtr v) { if (v->vtype == TYPE_str || ATOMextern(v->vtype)) { if (v->val.pval && v->val.pval != str_nil) GDKfree(v->val.pval); } VALempty(v); }
/* Clear V to an empty value (type void, value nil), freeing any * memory allocated for external types. See VALempty for when V does * not yet contain a value. */ void VALclear(ValPtr v) { if (ATOMextern(v->vtype)) { if (v->val.pval && v->val.pval != ATOMnilptr(v->vtype)) GDKfree(v->val.pval); } VALempty(v); }