1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* expand tabs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
svn 2019-04-10 09:16:00 +00:00
parent 25c1fd3b90
commit 481481b81a
7 changed files with 61 additions and 61 deletions

View file

@ -213,12 +213,12 @@ ossl_bn_initialize(int argc, VALUE *argv, VALUE self)
GetBN(self, bn);
switch (base) {
case 0:
if (!BN_mpi2bn((unsigned char *)StringValuePtr(str), RSTRING_LENINT(str), bn)) {
if (!BN_mpi2bn((unsigned char *)StringValuePtr(str), RSTRING_LENINT(str), bn)) {
ossl_raise(eBNError, NULL);
}
break;
case 2:
if (!BN_bin2bn((unsigned char *)StringValuePtr(str), RSTRING_LENINT(str), bn)) {
if (!BN_bin2bn((unsigned char *)StringValuePtr(str), RSTRING_LENINT(str), bn)) {
ossl_raise(eBNError, NULL);
}
break;

92
gc.c
View file

@ -2483,7 +2483,7 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
}
if (FL_TEST(obj, FL_FINALIZE)) {
make_zombie(objspace, obj, 0, 0);
make_zombie(objspace, obj, 0, 0);
return 1;
}
else {
@ -4204,7 +4204,7 @@ mark_locations_array(rb_objspace_t *objspace, register const VALUE *x, register
VALUE v;
while (n--) {
v = *x;
gc_mark_maybe(objspace, v);
gc_mark_maybe(objspace, v);
x++;
}
}
@ -4231,7 +4231,7 @@ gc_mark_values(rb_objspace_t *objspace, long n, const VALUE *values)
long i;
for (i=0; i<n; i++) {
gc_mark(objspace, values[i]);
gc_mark(objspace, values[i]);
}
}
@ -4473,7 +4473,7 @@ gc_mark_maybe(rb_objspace_t *objspace, VALUE obj)
unpoison_object(obj, false);
type = BUILTIN_TYPE(obj);
if (type != T_ZOMBIE && type != T_NONE) {
if (type != T_ZOMBIE && type != T_NONE) {
gc_mark_ptr(objspace, obj);
}
if (ptr) {
@ -4664,9 +4664,9 @@ gc_mark_imemo(rb_objspace_t *objspace, VALUE obj)
{
const rb_env_t *env = (const rb_env_t *)obj;
GC_ASSERT(VM_ENV_ESCAPED_P(env->ep));
gc_mark_values(objspace, (long)env->env_size, env->env);
gc_mark_values(objspace, (long)env->env_size, env->env);
VM_ENV_FLAGS_SET(env->ep, VM_ENV_FLAG_WB_REQUIRED);
gc_mark(objspace, (VALUE)rb_vm_env_prev_env(env));
gc_mark(objspace, (VALUE)rb_vm_env_prev_env(env));
gc_mark(objspace, (VALUE)env->iseq);
}
return;
@ -4758,7 +4758,7 @@ gc_mark_children(rb_objspace_t *objspace, VALUE obj)
case T_MODULE:
mark_m_tbl(objspace, RCLASS_M_TBL(obj));
if (!RCLASS_EXT(obj)) break;
mark_tbl(objspace, RCLASS_IV_TBL(obj));
mark_tbl(objspace, RCLASS_IV_TBL(obj));
mark_const_tbl(objspace, RCLASS_CONST_TBL(obj));
gc_mark(objspace, RCLASS_SUPER((VALUE)obj));
break;
@ -5365,7 +5365,7 @@ verify_internal_consistency_i(void *page_start, void *page_end, size_t stride, v
/* count objects */
data->live_object_count++;
rb_objspace_reachable_objects_from(obj, check_children_i, (void *)data);
rb_objspace_reachable_objects_from(obj, check_children_i, (void *)data);
#if USE_RGENGC
/* check health of children */
@ -6998,8 +6998,8 @@ gc_count_add_each_types(VALUE hash, const char *name, const size_t *types)
VALUE result = rb_hash_new_with_size(T_MASK);
int i;
for (i=0; i<T_MASK; i++) {
const char *type = type_name(i, 0);
rb_hash_aset(result, ID2SYM(rb_intern(type)), SIZET2NUM(types[i]));
const char *type = type_name(i, 0);
rb_hash_aset(result, ID2SYM(rb_intern(type)), SIZET2NUM(types[i]));
}
rb_hash_aset(hash, ID2SYM(rb_intern(name)), result);
}
@ -7042,47 +7042,47 @@ gc_info_decode(rb_objspace_t *objspace, const VALUE hash_or_key, const int orig_
VALUE flags = orig_flags ? orig_flags : objspace->profile.latest_gc_info;
if (SYMBOL_P(hash_or_key)) {
key = hash_or_key;
key = hash_or_key;
}
else if (RB_TYPE_P(hash_or_key, T_HASH)) {
hash = hash_or_key;
hash = hash_or_key;
}
else {
rb_raise(rb_eTypeError, "non-hash or symbol given");
rb_raise(rb_eTypeError, "non-hash or symbol given");
}
if (sym_major_by == Qnil) {
#define S(s) sym_##s = ID2SYM(rb_intern_const(#s))
S(major_by);
S(gc_by);
S(immediate_sweep);
S(have_finalizer);
S(state);
S(major_by);
S(gc_by);
S(immediate_sweep);
S(have_finalizer);
S(state);
S(stress);
S(nofree);
S(oldgen);
S(shady);
S(force);
S(stress);
S(nofree);
S(oldgen);
S(shady);
S(force);
#if RGENGC_ESTIMATE_OLDMALLOC
S(oldmalloc);
S(oldmalloc);
#endif
S(newobj);
S(malloc);
S(method);
S(capi);
S(newobj);
S(malloc);
S(method);
S(capi);
S(none);
S(marking);
S(sweeping);
S(none);
S(marking);
S(sweeping);
#undef S
}
#define SET(name, attr) \
if (key == sym_##name) \
return (attr); \
return (attr); \
else if (hash != Qnil) \
rb_hash_aset(hash, sym_##name, (attr));
rb_hash_aset(hash, sym_##name, (attr));
major_by =
(flags & GPR_FLAG_MAJOR_BY_NOFREE) ? sym_nofree :
@ -7096,25 +7096,25 @@ gc_info_decode(rb_objspace_t *objspace, const VALUE hash_or_key, const int orig_
SET(major_by, major_by);
SET(gc_by,
(flags & GPR_FLAG_NEWOBJ) ? sym_newobj :
(flags & GPR_FLAG_MALLOC) ? sym_malloc :
(flags & GPR_FLAG_METHOD) ? sym_method :
(flags & GPR_FLAG_CAPI) ? sym_capi :
(flags & GPR_FLAG_STRESS) ? sym_stress :
Qnil
(flags & GPR_FLAG_NEWOBJ) ? sym_newobj :
(flags & GPR_FLAG_MALLOC) ? sym_malloc :
(flags & GPR_FLAG_METHOD) ? sym_method :
(flags & GPR_FLAG_CAPI) ? sym_capi :
(flags & GPR_FLAG_STRESS) ? sym_stress :
Qnil
);
SET(have_finalizer, (flags & GPR_FLAG_HAVE_FINALIZE) ? Qtrue : Qfalse);
SET(immediate_sweep, (flags & GPR_FLAG_IMMEDIATE_SWEEP) ? Qtrue : Qfalse);
if (orig_flags == 0) {
SET(state, gc_mode(objspace) == gc_mode_none ? sym_none :
gc_mode(objspace) == gc_mode_marking ? sym_marking : sym_sweeping);
SET(state, gc_mode(objspace) == gc_mode_none ? sym_none :
gc_mode(objspace) == gc_mode_marking ? sym_marking : sym_sweeping);
}
#undef SET
if (!NIL_P(key)) {/* matched key should return above */
rb_raise(rb_eArgError, "unknown key: %"PRIsVALUE, rb_sym2str(key));
rb_raise(rb_eArgError, "unknown key: %"PRIsVALUE, rb_sym2str(key));
}
return hash;
@ -7144,12 +7144,12 @@ gc_latest_gc_info(int argc, VALUE *argv, VALUE self)
if (rb_check_arity(argc, 0, 1) == 1) {
arg = argv[0];
if (!SYMBOL_P(arg) && !RB_TYPE_P(arg, T_HASH)) {
rb_raise(rb_eTypeError, "non-hash or symbol given");
}
if (!SYMBOL_P(arg) && !RB_TYPE_P(arg, T_HASH)) {
rb_raise(rb_eTypeError, "non-hash or symbol given");
}
}
else {
arg = rb_hash_new();
arg = rb_hash_new();
}
return gc_info_decode(objspace, arg, 0);

View file

@ -1144,7 +1144,7 @@ struct rb_data_type_struct {
void (*dmark)(void*);
void (*dfree)(void*);
size_t (*dsize)(const void *);
void *reserved[2]; /* For future extension.
void *reserved[2]; /* For future extension.
This array *must* be filled with ZERO. */
} function;
const rb_data_type_t *parent;

View file

@ -1163,7 +1163,7 @@ struct MEMO {
union {
long cnt;
long state;
const VALUE value;
const VALUE value;
VALUE (*func)(ANYARGS);
} u3;
};

16
iseq.c
View file

@ -156,7 +156,7 @@ iseq_extract_values(const VALUE *code, size_t pos, iseq_value_itr_t * func, void
{
VALUE op = code[pos + op_no + 1];
if (!SPECIAL_CONST_P(op)) {
func(data, op);
func(data, op);
}
break;
}
@ -164,7 +164,7 @@ iseq_extract_values(const VALUE *code, size_t pos, iseq_value_itr_t * func, void
{
union iseq_inline_storage_entry *const is = (union iseq_inline_storage_entry *)code[pos + op_no + 1];
if (is->once.value) {
func(data, is->once.value);
func(data, is->once.value);
}
break;
}
@ -224,12 +224,12 @@ rb_iseq_mark(const rb_iseq_t *iseq)
rb_iseq_each_value(iseq, each_insn_value, NULL);
}
rb_gc_mark(body->variable.coverage);
rb_gc_mark(body->variable.coverage);
rb_gc_mark(body->variable.pc2branchindex);
rb_gc_mark(body->location.label);
rb_gc_mark(body->location.base_label);
rb_gc_mark(body->location.pathobj);
RUBY_MARK_UNLESS_NULL((VALUE)body->parent_iseq);
rb_gc_mark(body->location.label);
rb_gc_mark(body->location.base_label);
rb_gc_mark(body->location.pathobj);
RUBY_MARK_UNLESS_NULL((VALUE)body->parent_iseq);
if (body->param.flags.has_kw && ISEQ_COMPILE_DATA(iseq) == NULL) {
const struct rb_iseq_param_keyword *const keyword = body->param.keyword;
@ -252,7 +252,7 @@ rb_iseq_mark(const rb_iseq_t *iseq)
const struct iseq_catch_table_entry *entry;
entry = &table->entries[i];
if (entry->iseq) {
rb_gc_mark((VALUE)entry->iseq);
rb_gc_mark((VALUE)entry->iseq);
}
}
}

View file

@ -414,7 +414,7 @@ struct rb_iseq_constant_body {
int bits_start;
int rest_start;
const ID *table;
const VALUE *default_values;
const VALUE *default_values;
} *keyword;
} param;

View file

@ -671,8 +671,8 @@ MJIT_FUNC_EXPORTED void
rb_add_method_iseq(VALUE klass, ID mid, const rb_iseq_t *iseq, rb_cref_t *cref, rb_method_visibility_t visi)
{
struct { /* should be same fields with rb_method_iseq_struct */
const rb_iseq_t *iseqptr;
rb_cref_t *cref;
const rb_iseq_t *iseqptr;
rb_cref_t *cref;
} iseq_body;
iseq_body.iseqptr = iseq;