projects
/
chise
/
concord.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73a70ba
)
(cos_make_symbol): Use `cos_retain_object' for `obj->name'.
author
MORIOKA Tomohiko
<tomo.git@chise.org>
Tue, 16 Apr 2013 09:47:04 +0000
(18:47 +0900)
committer
MORIOKA Tomohiko
<tomo.git@chise.org>
Tue, 16 Apr 2013 09:47:04 +0000
(18:47 +0900)
(cos_retain_symbol): New function.
symbol.c
patch
|
blob
|
history
diff --git
a/symbol.c
b/symbol.c
index
a01b4ce
..
94cf020
100644
(file)
--- 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)