mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* gc.c: fixed indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
434b820f51
commit
8c36abe23a
1 changed files with 10 additions and 9 deletions
19
gc.c
19
gc.c
|
@ -190,7 +190,8 @@ rb_global_variable(VALUE *var)
|
||||||
void
|
void
|
||||||
rb_memerror(void)
|
rb_memerror(void)
|
||||||
{
|
{
|
||||||
static int recurse = 0;
|
static int recurse = 0;
|
||||||
|
|
||||||
if (!nomem_error || (recurse > 0 && rb_safe_level() < 4)) {
|
if (!nomem_error || (recurse > 0 && rb_safe_level() < 4)) {
|
||||||
fprintf(stderr, "[FATAL] failed to allocate memory\n");
|
fprintf(stderr, "[FATAL] failed to allocate memory\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -616,11 +617,11 @@ static int grow_direction;
|
||||||
static int
|
static int
|
||||||
stack_grow_direction(VALUE *addr)
|
stack_grow_direction(VALUE *addr)
|
||||||
{
|
{
|
||||||
rb_thread_t *th = GET_THREAD();
|
rb_thread_t *th = GET_THREAD();
|
||||||
SET_STACK_END;
|
SET_STACK_END;
|
||||||
|
|
||||||
if (STACK_END > addr) return grow_direction = 1;
|
if (STACK_END > addr) return grow_direction = 1;
|
||||||
return grow_direction = -1;
|
return grow_direction = -1;
|
||||||
}
|
}
|
||||||
# define stack_growup_p(x) ((grow_direction ? grow_direction : stack_grow_direction(x)) > 0)
|
# 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)
|
# define STACK_UPPER(x, a, b) (stack_growup_p(x) ? a : b)
|
||||||
|
@ -631,10 +632,10 @@ stack_grow_direction(VALUE *addr)
|
||||||
int
|
int
|
||||||
ruby_stack_length(VALUE **p)
|
ruby_stack_length(VALUE **p)
|
||||||
{
|
{
|
||||||
rb_thread_t *th = GET_THREAD();
|
rb_thread_t *th = GET_THREAD();
|
||||||
SET_STACK_END;
|
SET_STACK_END;
|
||||||
if (p) *p = STACK_UPPER(STACK_END, STACK_START, STACK_END);
|
if (p) *p = STACK_UPPER(STACK_END, STACK_START, STACK_END);
|
||||||
return STACK_LENGTH;
|
return STACK_LENGTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
Loading…
Reference in a new issue