Changeset ddbbcffa for variable.c
- Timestamp:
- Feb 11, 2011, 4:31:42 PM (14 years ago)
- Branches:
- master, release-1.10, 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
variable.c
r96828e4 rddbbcffa 559 559 560 560 void 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); 562 562 var->summary = owl_strdup(summary); 563 if(var->description) owl_free(var->description);563 if(var->description) g_free(var->description); 564 564 var->description = owl_strdup(desc); 565 565 } … … 569 569 if(old) { 570 570 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); 572 572 old->pval_default = owl_strdup(initval); 573 573 } else { … … 639 639 void owl_variable_dict_namelist_cleanup(owl_list *l) 640 640 { 641 owl_list_cleanup(l, owl_free);641 owl_list_cleanup(l, g_free); 642 642 } 643 643 … … 645 645 { 646 646 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); 651 651 } 652 652 … … 869 869 void owl_variable_delete_default(owl_variable *v) 870 870 { 871 if (v->val) owl_free(v->val);871 if (v->val) g_free(v->val); 872 872 } 873 873 … … 1008 1008 if (!v->validate_fn(v, newval)) return(-1); 1009 1009 } 1010 if (v->val) owl_free(v->val);1010 if (v->val) g_free(v->val); 1011 1011 v->val = owl_strdup(newval); 1012 1012 return(0);
Note: See TracChangeset
for help on using the changeset viewer.