Changeset ddbbcffa for variable.c


Ignore:
Timestamp:
Feb 11, 2011, 4:31:42 PM (10 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
d4927a7
Parents:
35b6eb9
git-author:
Anders Kaseorg <andersk@mit.edu> (08/27/09 00:52:41)
git-committer:
Anders Kaseorg <andersk@mit.edu> (02/11/11 16:31:42)
Message:
Replace owl_free with g_free.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Karl Ramm <kcr@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • variable.c

    r96828e4 rddbbcffa  
    559559
    560560void owl_variable_update(owl_variable *var, const char *summary, const char *desc) {
    561   if(var->summary) owl_free(var->summary);
     561  if(var->summary) g_free(var->summary);
    562562  var->summary = owl_strdup(summary);
    563   if(var->description) owl_free(var->description);
     563  if(var->description) g_free(var->description);
    564564  var->description = owl_strdup(desc);
    565565}
     
    569569  if(old) {
    570570    owl_variable_update(old, summ, desc);
    571     if(old->pval_default) owl_free(old->pval_default);
     571    if(old->pval_default) g_free(old->pval_default);
    572572    old->pval_default = owl_strdup(initval);
    573573  } else {
     
    639639void owl_variable_dict_namelist_cleanup(owl_list *l)
    640640{
    641   owl_list_cleanup(l, owl_free);
     641  owl_list_cleanup(l, g_free);
    642642}
    643643
     
    645645{
    646646  if (v->delete_fn) v->delete_fn(v);
    647   owl_free(v->name);
    648   owl_free(v->summary);
    649   owl_free(v->description);
    650   owl_free(v);
     647  g_free(v->name);
     648  g_free(v->summary);
     649  g_free(v->description);
     650  g_free(v);
    651651}
    652652
     
    869869void owl_variable_delete_default(owl_variable *v)
    870870{
    871   if (v->val) owl_free(v->val);
     871  if (v->val) g_free(v->val);
    872872}
    873873
     
    10081008    if (!v->validate_fn(v, newval)) return(-1);
    10091009  }
    1010   if (v->val) owl_free(v->val);
     1010  if (v->val) g_free(v->val);
    10111011  v->val = owl_strdup(newval);
    10121012  return(0);
Note: See TracChangeset for help on using the changeset viewer.