From a966e055800566f26ae5b08778d457760a61bae5 Mon Sep 17 00:00:00 2001 From: MORIOKA Tomohiko Date: Tue, 16 Apr 2013 18:47:04 +0900 Subject: [PATCH] (cos_make_symbol): Use `cos_retain_object' for `obj->name'. (cos_retain_symbol): New function. --- symbol.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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) -- 1.7.10.4