summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-09-27 03:43:15 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-09-27 03:43:15 +0000
commit3df207c883f111b34b6af22c4ade7b8be357b190 (patch)
tree8f1f37c29956c434f401d7d5d48ff14f37094e16 /gc.c
parentd917f9af979642b88cf8a4a55f7dd4520b7481fb (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/gc.c b/gc.c
index 8533773..a7e272f 100644
--- a/gc.c
+++ b/gc.c
@@ -753,19 +753,27 @@ obj_free(obj)
break;
case T_STRING:
#define STR_NO_ORIG FL_USER2 /* copied from string.c */
- if (!RANY(obj)->as.string.orig || FL_TEST(obj, STR_NO_ORIG))
+ if (!RANY(obj)->as.string.orig || FL_TEST(obj, STR_NO_ORIG)) {
free(RANY(obj)->as.string.ptr);
+ }
break;
case T_ARRAY:
- if (RANY(obj)->as.array.ptr) free(RANY(obj)->as.array.ptr);
+ if (RANY(obj)->as.array.ptr) {
+ free(RANY(obj)->as.array.ptr);
+ }
break;
case T_HASH:
- if (RANY(obj)->as.hash.tbl)
+ if (RANY(obj)->as.hash.tbl) {
st_free_table(RANY(obj)->as.hash.tbl);
+ }
break;
case T_REGEXP:
- if (RANY(obj)->as.regexp.ptr) re_free_pattern(RANY(obj)->as.regexp.ptr);
- if (RANY(obj)->as.regexp.str) free(RANY(obj)->as.regexp.str);
+ if (RANY(obj)->as.regexp.ptr) {
+ re_free_pattern(RANY(obj)->as.regexp.ptr);
+ }
+ if (RANY(obj)->as.regexp.str) {
+ free(RANY(obj)->as.regexp.str);
+ }
break;
case T_DATA:
if (DATA_PTR(obj)) {
@@ -798,7 +806,9 @@ obj_free(obj)
break;
case T_BIGNUM:
- if (RANY(obj)->as.bignum.digits) free(RANY(obj)->as.bignum.digits);
+ if (RANY(obj)->as.bignum.digits) {
+ free(RANY(obj)->as.bignum.digits);
+ }
break;
case T_NODE:
switch (nd_type(obj)) {
@@ -827,8 +837,9 @@ obj_free(obj)
break;
case T_STRUCT:
- if (RANY(obj)->as.rstruct.ptr)
+ if (RANY(obj)->as.rstruct.ptr) {
free(RANY(obj)->as.rstruct.ptr);
+ }
break;
default: