Skip to content

Commit

Permalink
* eval.c, eval_intern.h, include/ruby/intern.h, include/ruby/ruby.h,
Browse files Browse the repository at this point in the history
  vm.c, vm_core.h, vm_insnhelper.c: remove pointless "const".



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
ko1 committed May 22, 2008
1 parent 846ea17 commit a45cd8a
Show file tree
Hide file tree
Showing 9 changed files with 185 additions and 208 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Fri May 23 01:15:09 2008 Koichi Sasada <ko1@atdot.net>

* eval.c, eval_intern.h, include/ruby/intern.h, include/ruby/ruby.h,
vm.c, vm_core.h, vm_insnhelper.c: remove pointless "const".

Thu May 22 23:45:17 2008 Yusuke Endoh <mame@tsg.ne.jp>

* compile.c (get_destination_insn, get_next_insn, get_prev_insn):
Expand Down
40 changes: 20 additions & 20 deletions eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "eval_intern.h"

VALUE proc_invoke(VALUE, VALUE, VALUE, VALUE);
VALUE rb_binding_new();
VALUE rb_binding_new(void);

VALUE rb_f_block_given_p(void);

Expand All @@ -34,7 +34,7 @@ static VALUE exception_error;

static VALUE eval_string(VALUE, VALUE, VALUE, const char *, int);

static inline VALUE rb_yield_0(const int argc, const VALUE * const argv);
static inline VALUE rb_yield_0(int argc, const VALUE *argv);
static VALUE rb_call(VALUE, VALUE, ID, int, const VALUE *, int);

#include "eval_error.c"
Expand Down Expand Up @@ -909,13 +909,13 @@ rb_need_block()
}

static inline VALUE
rb_yield_0(const int argc, const VALUE * const argv)
rb_yield_0(int argc, const VALUE * argv)
{
return vm_yield(GET_THREAD(), argc, argv);
}

VALUE
rb_yield(const VALUE val)
rb_yield(VALUE val)
{
volatile VALUE tmp = val;
if (val == Qundef) {
Expand All @@ -928,7 +928,7 @@ rb_yield(const VALUE val)
}

VALUE
rb_yield_values(const int n, ...)
rb_yield_values(int n, ...)
{
int i;
VALUE *argv;
Expand All @@ -950,13 +950,13 @@ rb_yield_values(const int n, ...)
}

VALUE
rb_yield_values2(const int argc, VALUE * const argv)
rb_yield_values2(int argc, const VALUE *argv)
{
return rb_yield_0(argc, argv);
}

VALUE
rb_yield_splat(const VALUE values)
rb_yield_splat(VALUE values)
{
VALUE tmp = rb_check_array_type(values);
volatile VALUE v;
Expand Down Expand Up @@ -1000,8 +1000,8 @@ rb_f_loop(void)
}

VALUE
rb_iterate(VALUE (* const it_proc) (VALUE), const VALUE data1,
VALUE (* const bl_proc) (ANYARGS), VALUE const data2)
rb_iterate(VALUE (* it_proc) (VALUE), VALUE data1,
VALUE (* bl_proc) (ANYARGS), VALUE data2)
{
int state;
volatile VALUE retval = Qnil;
Expand Down Expand Up @@ -1069,18 +1069,18 @@ struct iter_method_arg {
};

static VALUE
iterate_method(const VALUE obj)
iterate_method(VALUE obj)
{
const struct iter_method_arg * const arg =
const struct iter_method_arg * arg =
(struct iter_method_arg *) obj;

return rb_call(CLASS_OF(arg->obj), arg->obj, arg->mid,
arg->argc, arg->argv, CALL_FCALL);
}

VALUE
rb_block_call(const VALUE obj, const ID mid, const int argc, VALUE * const argv,
VALUE (*const bl_proc) (ANYARGS), const VALUE data2)
rb_block_call(VALUE obj, ID mid, int argc, VALUE * argv,
VALUE (*bl_proc) (ANYARGS), VALUE data2)
{
struct iter_method_arg arg;

Expand All @@ -1092,17 +1092,17 @@ rb_block_call(const VALUE obj, const ID mid, const int argc, VALUE * const argv,
}

VALUE
rb_each(const VALUE obj)
rb_each(VALUE obj)
{
return rb_call(CLASS_OF(obj), obj, idEach, 0, 0, CALL_FCALL);
}

VALUE
rb_rescue2(VALUE (* const b_proc) (ANYARGS), const VALUE data1,
VALUE (* const r_proc) (ANYARGS), VALUE data2, ...)
rb_rescue2(VALUE (* b_proc) (ANYARGS), VALUE data1,
VALUE (* r_proc) (ANYARGS), VALUE data2, ...)
{
int state;
rb_thread_t * const th = GET_THREAD();
rb_thread_t *th = GET_THREAD();
rb_control_frame_t *cfp = th->cfp;
volatile VALUE result;
volatile VALUE e_info = th->errinfo;
Expand Down Expand Up @@ -1160,15 +1160,15 @@ rb_rescue2(VALUE (* const b_proc) (ANYARGS), const VALUE data1,
}

VALUE
rb_rescue(VALUE (* const b_proc)(ANYARGS), const VALUE data1,
VALUE (* const r_proc)(ANYARGS), const VALUE data2)
rb_rescue(VALUE (* b_proc)(ANYARGS), VALUE data1,
VALUE (* r_proc)(ANYARGS), VALUE data2)
{
return rb_rescue2(b_proc, data1, r_proc, data2, rb_eStandardError,
(VALUE)0);
}

VALUE
rb_protect(VALUE (* const proc) (VALUE), const VALUE data, int * const state)
rb_protect(VALUE (* proc) (VALUE), VALUE data, int * state)
{
VALUE result = Qnil; /* OK */
int status;
Expand Down
18 changes: 8 additions & 10 deletions eval_intern.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,21 +222,19 @@ NORETURN(void rb_fiber_start(void));

NORETURN(void rb_raise_jump(VALUE));
NORETURN(void rb_print_undef(VALUE, ID, int));
NORETURN(void vm_localjump_error(const char * const, const VALUE, const int));
NORETURN(void vm_jump_tag_but_local_jump(const int, const VALUE));
NORETURN(void vm_localjump_error(const char *,VALUE, int));
NORETURN(void vm_jump_tag_but_local_jump(int, VALUE));

NODE *vm_cref_push(rb_thread_t * const th, const VALUE, const int);
NODE *vm_set_special_cref(rb_thread_t *th, VALUE *lfp, NODE * cref_stack);
VALUE vm_make_jump_tag_but_local_jump(const int state, VALUE val);
NODE *vm_cref_push(rb_thread_t * th, VALUE, int);
NODE *vm_set_special_cref(rb_thread_t *th, VALUE *lfp, NODE *cref_stack);
VALUE vm_make_jump_tag_but_local_jump(int state, VALUE val);
NODE *ruby_cref(void);
rb_control_frame_t *vm_get_ruby_level_cfp(rb_thread_t *th, rb_control_frame_t *cfp);
VALUE rb_obj_is_proc(VALUE);
void rb_vm_check_redefinition_opt_method(NODE * const node);
VALUE rb_vm_call_cfunc(const VALUE recv, VALUE (* const func)(VALUE),
const VALUE arg, rb_block_t * const blockptr,
const VALUE filename);
void rb_vm_check_redefinition_opt_method(const NODE *node);
VALUE rb_vm_call_cfunc(VALUE recv, VALUE (*func)(VALUE), VALUE arg, const rb_block_t *blockptr, VALUE filename);
void rb_thread_terminate_all(void);
void rb_vm_set_eval_stack(rb_thread_t * const, const VALUE iseq, NODE * const cref);
void rb_vm_set_eval_stack(rb_thread_t *, VALUE iseq, const NODE *cref);
VALUE rb_vm_top_self();
VALUE rb_vm_cbase(void);

Expand Down
8 changes: 4 additions & 4 deletions include/ruby/intern.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ VALUE rb_obj_method(VALUE, VALUE);
VALUE rb_method_call(int, VALUE*, VALUE);
int rb_mod_method_arity(VALUE, ID);
int rb_obj_method_arity(VALUE, ID);
VALUE rb_protect(VALUE (* const)(VALUE), const VALUE, int* const);
VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*);
void rb_set_end_proc(void (*)(VALUE), VALUE);
void rb_mark_end_proc(void);
void rb_exec_end_proc(void);
Expand Down Expand Up @@ -438,9 +438,9 @@ int rb_symname_p(const char*);
int rb_sym_interned_p(VALUE);
void rb_gc_mark_symbols(void);
VALUE rb_backref_get(void);
void rb_backref_set(const VALUE);
void rb_backref_set(VALUE);
VALUE rb_lastline_get(void);
void rb_lastline_set(const VALUE);
void rb_lastline_set(VALUE);
VALUE rb_sym_all_symbols(void);
/* process.c */
void rb_last_status_set(int status, rb_pid_t pid);
Expand Down Expand Up @@ -662,7 +662,7 @@ VALUE rb_str_succ(VALUE);
VALUE rb_time_succ(VALUE);
void Init_stack(VALUE*);
void rb_frame_pop(void);
int rb_frame_method_id_and_class(ID * const idp, VALUE * const klassp);
int rb_frame_method_id_and_class(ID *idp, VALUE *klassp);

#if defined(__cplusplus)
#if 0
Expand Down
20 changes: 10 additions & 10 deletions include/ruby/ruby.h
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ VALUE rb_funcall(VALUE, ID, int, ...);
VALUE rb_funcall2(VALUE, ID, int, const VALUE*);
VALUE rb_funcall3(VALUE, ID, int, const VALUE*);
int rb_scan_args(int, const VALUE*, const char*, ...);
VALUE rb_call_super(const int, const VALUE* const);
VALUE rb_call_super(int, const VALUE*);

VALUE rb_gv_set(const char*, VALUE);
VALUE rb_gv_get(const char*);
Expand Down Expand Up @@ -817,17 +817,17 @@ PRINTF_ARGS(void rb_compile_warn(const char *, int, const char*, ...), 3, 4);

typedef VALUE rb_block_call_func(VALUE, VALUE, int, VALUE*);

VALUE rb_each(const VALUE);
VALUE rb_yield(const VALUE);
VALUE rb_yield_values(const int n, ...);
VALUE rb_yield_values2(const int n, VALUE * const argv);
VALUE rb_yield_splat(const VALUE);
VALUE rb_each(VALUE);
VALUE rb_yield(VALUE);
VALUE rb_yield_values(int n, ...);
VALUE rb_yield_values2(int n, const VALUE *argv);
VALUE rb_yield_splat(VALUE);
int rb_block_given_p(void);
void rb_need_block(void);
VALUE rb_iterate(VALUE(* const)(VALUE),const VALUE,VALUE(* const)(ANYARGS),const VALUE);
VALUE rb_block_call(const VALUE,const ID,const int,VALUE* const,VALUE(* const)(ANYARGS),const VALUE);
VALUE rb_rescue(VALUE(* const)(ANYARGS),const VALUE,VALUE(* const)(ANYARGS),const VALUE);
VALUE rb_rescue2(VALUE(* const)(ANYARGS),const VALUE,VALUE(* const)(ANYARGS),VALUE,...);
VALUE rb_iterate(VALUE(*)(VALUE),VALUE,VALUE(*)(ANYARGS),VALUE);
VALUE rb_block_call(VALUE,ID,int,VALUE*,VALUE(*)(ANYARGS),VALUE);
VALUE rb_rescue(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE);
VALUE rb_rescue2(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE,...);
VALUE rb_ensure(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE);
VALUE rb_catch(const char*,VALUE(*)(ANYARGS),VALUE);
VALUE rb_catch_obj(VALUE,VALUE(*)(ANYARGS),VALUE);
Expand Down
6 changes: 3 additions & 3 deletions version.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#define RUBY_VERSION "1.9.0"
#define RUBY_RELEASE_DATE "2008-05-22"
#define RUBY_RELEASE_DATE "2008-05-23"
#define RUBY_VERSION_CODE 190
#define RUBY_RELEASE_CODE 20080522
#define RUBY_RELEASE_CODE 20080523
#define RUBY_PATCHLEVEL 0

#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 0
#define RUBY_RELEASE_YEAR 2008
#define RUBY_RELEASE_MONTH 5
#define RUBY_RELEASE_DAY 22
#define RUBY_RELEASE_DAY 23

#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];
Expand Down
Loading

0 comments on commit a45cd8a

Please sign in to comment.