From: MORIOKA Tomohiko Date: Tue, 16 Apr 2013 09:47:04 +0000 (+0900) Subject: (cos_make_symbol): Use `cos_retain_object' for `obj->name'. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a966e055800566f26ae5b08778d457760a61bae5;p=chise%2Fconcord.git (cos_make_symbol): Use `cos_retain_object' for `obj->name'. (cos_retain_symbol): New function. --- diff --git a/symbol.c b/symbol.c index a01b4ce..94cf020 100644 --- a/symbol.c +++ b/symbol.c @@ -66,10 +66,19 @@ cos_make_symbol (COS_String string) obj->name = string; obj->value = NULL; + cos_retain_object (string); return obj; } int +cos_retain_symbol (COS_Object obj) +{ + cos_retain_object (((COS_Symbol)obj)->value); + cos_retain_object (((COS_Symbol)obj)->name); + return 0; +} + +int cos_release_symbol (COS_Object obj) { if (obj == NULL)