summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-12 03:52:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-12 03:52:52 +0000
commit8c36abe23a9c9e980e398171c860a6756716e124 (patch)
tree90e7a850db54fbaaad6983b9ae72aec2375aed4c /gc.c
parent434b820f5153373f1b8053f894f9cd075dd3ccb0 (diff)
* gc.c: fixed indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/gc.c b/gc.c
index 7d05f33d5c..56dbb3efb8 100644
--- a/gc.c
+++ b/gc.c
@@ -190,7 +190,8 @@ rb_global_variable(VALUE *var)
void
rb_memerror(void)
{
- static int recurse = 0;
+ static int recurse = 0;
+
if (!nomem_error || (recurse > 0 && rb_safe_level() < 4)) {
fprintf(stderr, "[FATAL] failed to allocate memory\n");
exit(1);
@@ -616,11 +617,11 @@ static int grow_direction;
static int
stack_grow_direction(VALUE *addr)
{
- rb_thread_t *th = GET_THREAD();
- SET_STACK_END;
+ rb_thread_t *th = GET_THREAD();
+ SET_STACK_END;
- if (STACK_END > addr) return grow_direction = 1;
- return grow_direction = -1;
+ if (STACK_END > addr) return grow_direction = 1;
+ return grow_direction = -1;
}
# define stack_growup_p(x) ((grow_direction ? grow_direction : stack_grow_direction(x)) > 0)
# define STACK_UPPER(x, a, b) (stack_growup_p(x) ? a : b)
@@ -631,10 +632,10 @@ stack_grow_direction(VALUE *addr)
int
ruby_stack_length(VALUE **p)
{
- rb_thread_t *th = GET_THREAD();
- SET_STACK_END;
- if (p) *p = STACK_UPPER(STACK_END, STACK_START, STACK_END);
- return STACK_LENGTH;
+ rb_thread_t *th = GET_THREAD();
+ SET_STACK_END;
+ if (p) *p = STACK_UPPER(STACK_END, STACK_START, STACK_END);
+ return STACK_LENGTH;
}
int