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

* eval.c, hash.c, load.c, proc.c, range.c, thread.c, time.c: don't

declare internal functions.

* internal.h, vm_core.h: declare internal functions.

* array.c: include internal.h.

* common.mk: update dependency for array.o.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2011-06-18 08:26:19 +00:00
parent bc46292caa
commit 5ed8c08aa0
12 changed files with 23 additions and 11 deletions

View file

@ -1,3 +1,14 @@
Sat Jun 18 17:23:38 2011 Tanaka Akira <akr@fsij.org>
* eval.c, hash.c, load.c, proc.c, range.c, thread.c, time.c: don't
declare internal functions.
* internal.h, vm_core.h: declare internal functions.
* array.c: include internal.h.
* common.mk: update dependency for array.o.
Sat Jun 18 13:39:33 2011 Tanaka Akira <akr@fsij.org>
* internal.h: declarations declared in include/ruby/*.h removed.

View file

@ -15,6 +15,7 @@
#include "ruby/util.h"
#include "ruby/st.h"
#include "ruby/encoding.h"
#include "internal.h"
#ifndef ARRAY_DEBUG
# define NDEBUG

View file

@ -584,7 +584,7 @@ VM_CORE_H_INCLUDES = {$(VPATH)}vm_core.h {$(VPATH)}thread_$(THREAD_MODEL).h \
$(ID_H_INCLUDES)
array.$(OBJEXT): {$(VPATH)}array.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h \
$(ENCODING_H_INCLUDES)
$(ENCODING_H_INCLUDES) {$(VPATH)}internal.h
bignum.$(OBJEXT): {$(VPATH)}bignum.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h \
{$(VPATH)}internal.h
class.$(OBJEXT): {$(VPATH)}class.c $(RUBY_H_INCLUDES) \

2
eval.c
View file

@ -115,8 +115,6 @@ ruby_cleanup(volatile int ex)
volatile VALUE errs[2];
rb_thread_t *th = GET_THREAD();
int nerr;
void rb_threadptr_interrupt(rb_thread_t *th);
void rb_threadptr_check_signal(rb_thread_t *mth);
rb_threadptr_interrupt(th);
rb_threadptr_check_signal(th);

1
hash.c
View file

@ -510,7 +510,6 @@ rb_hash_aref(VALUE hash, VALUE key)
st_data_t val;
if (!RHASH(hash)->ntbl || !st_lookup(RHASH(hash)->ntbl, key, &val)) {
int rb_method_basic_definition_p(VALUE klass, ID id);
if (!FL_TEST(hash, HASH_PROC_DEFAULT) &&
rb_method_basic_definition_p(CLASS_OF(hash), id_default)) {
return RHASH_IFNONE(hash);

View file

@ -39,6 +39,9 @@ struct rb_classext_struct {
struct vtm; /* defined by timev.h */
/* array.c */
VALUE rb_ary_last(int, VALUE *, VALUE);
/* bignum.c */
VALUE rb_big_fdiv(VALUE x, VALUE y);
VALUE rb_big_uminus(VALUE x);
@ -123,6 +126,9 @@ VALUE rb_obj_equal(VALUE obj1, VALUE obj2);
VALUE rb_parser_get_yydebug(VALUE);
VALUE rb_parser_set_yydebug(VALUE, VALUE);
/* proc.c */
VALUE rb_proc_location(VALUE self);
/* rational.c */
VALUE rb_lcm(VALUE x, VALUE y);
@ -173,6 +179,7 @@ void rb_vm_bugreport(void);
/* vm_eval.c */
void Init_vm_eval(void);
VALUE rb_current_realfilepath(void);
/* vm_method.c */
void Init_eval_method(void);

1
load.c
View file

@ -467,7 +467,6 @@ rb_f_require(VALUE obj, VALUE fname)
VALUE
rb_f_require_relative(VALUE obj, VALUE fname)
{
VALUE rb_current_realfilepath(void);
VALUE base = rb_current_realfilepath();
if (NIL_P(base)) {
rb_raise(rb_eLoadError, "cannot infer basepath");

2
proc.c
View file

@ -1421,8 +1421,6 @@ rb_method_call(int argc, VALUE *argv, VALUE method)
}
if ((state = EXEC_TAG()) == 0) {
rb_thread_t *th = GET_THREAD();
VALUE rb_vm_call(rb_thread_t *th, VALUE recv, VALUE id, int argc, const VALUE *argv,
const rb_method_entry_t *me);
PASS_PASSED_BLOCK_TH(th);
result = rb_vm_call(th, data->recv, data->id, argc, argv, &data->me);

View file

@ -600,8 +600,6 @@ range_first(int argc, VALUE *argv, VALUE range)
static VALUE
range_last(int argc, VALUE *argv, VALUE range)
{
VALUE rb_ary_last(int, VALUE *, VALUE);
if (argc == 0) return RANGE_END(range);
return rb_ary_last(argc, argv, rb_Array(range));
}

View file

@ -613,7 +613,6 @@ thread_initialize(VALUE thread, VALUE args)
}
GetThreadPtr(thread, th);
if (th->first_args) {
VALUE rb_proc_location(VALUE self);
VALUE proc = th->first_proc, line, loc;
const char *file;
if (!proc || !RTEST(loc = rb_proc_location(proc))) {

1
time.c
View file

@ -4519,7 +4519,6 @@ strftimev(const char *fmt, VALUE time)
static VALUE
time_strftime(VALUE time, VALUE format)
{
void rb_enc_copy(VALUE, VALUE);
struct time_object *tobj;
char buffer[SMALLBUF], *buf = buffer;
const char *fmt;

View file

@ -647,6 +647,8 @@ VALUE rb_vm_make_proc(rb_thread_t *th, const rb_block_t *block, VALUE klass);
VALUE rb_vm_make_env_object(rb_thread_t *th, rb_control_frame_t *cfp);
void rb_vm_inc_const_missing_count(void);
void rb_vm_gvl_destroy(rb_vm_t *vm);
VALUE rb_vm_call(rb_thread_t *th, VALUE recv, VALUE id, int argc,
const VALUE *argv, const rb_method_entry_t *me);
void rb_thread_start_timer_thread(void);
void rb_thread_stop_timer_thread(void);
@ -698,6 +700,7 @@ void rb_threadptr_check_signal(rb_thread_t *mth);
void rb_threadptr_signal_raise(rb_thread_t *th, int sig);
void rb_threadptr_signal_exit(rb_thread_t *th);
void rb_threadptr_execute_interrupts(rb_thread_t *);
void rb_threadptr_interrupt(rb_thread_t *th);
void rb_thread_lock_unlock(rb_thread_lock_t *);
void rb_thread_lock_destroy(rb_thread_lock_t *);