mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* cont.c (rb_fiber_current), dln.c (dln_print_undef, dln_undefined),
eval.c (rb_iterator_p, rb_need_block), load.c: (Init_load), ruby.c (uscore_get, rb_f_chop), st.c (stat_col), signal.c (rb_signal_buff_size, ruby_sig_finalize), thread.c (rb_thread_sleep_forever, rb_thread_sleep_deadly, rb_thread_alone): protoized. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f1137963e3
commit
845103b751
7 changed files with 13 additions and 13 deletions
2
cont.c
2
cont.c
|
@ -818,7 +818,7 @@ root_fiber_alloc(rb_thread_t *th)
|
||||||
}
|
}
|
||||||
|
|
||||||
VALUE
|
VALUE
|
||||||
rb_fiber_current()
|
rb_fiber_current(void)
|
||||||
{
|
{
|
||||||
rb_thread_t *th = GET_THREAD();
|
rb_thread_t *th = GET_THREAD();
|
||||||
if (th->fiber == 0) {
|
if (th->fiber == 0) {
|
||||||
|
|
4
dln.c
4
dln.c
|
@ -445,14 +445,14 @@ undef_print(char *key, char *value)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dln_print_undef()
|
dln_print_undef(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr, " Undefined symbols:\n");
|
fprintf(stderr, " Undefined symbols:\n");
|
||||||
st_foreach(undef_tbl, undef_print, NULL);
|
st_foreach(undef_tbl, undef_print, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dln_undefined()
|
dln_undefined(void)
|
||||||
{
|
{
|
||||||
if (undef_tbl->num_entries > 0) {
|
if (undef_tbl->num_entries > 0) {
|
||||||
fprintf(stderr, "dln: Calling undefined function\n");
|
fprintf(stderr, "dln: Calling undefined function\n");
|
||||||
|
|
4
eval.c
4
eval.c
|
@ -542,7 +542,7 @@ rb_block_given_p(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
rb_iterator_p()
|
rb_iterator_p(void)
|
||||||
{
|
{
|
||||||
return rb_block_given_p();
|
return rb_block_given_p();
|
||||||
}
|
}
|
||||||
|
@ -550,7 +550,7 @@ rb_iterator_p()
|
||||||
VALUE rb_eThreadError;
|
VALUE rb_eThreadError;
|
||||||
|
|
||||||
void
|
void
|
||||||
rb_need_block()
|
rb_need_block(void)
|
||||||
{
|
{
|
||||||
if (!rb_block_given_p()) {
|
if (!rb_block_given_p()) {
|
||||||
rb_vm_localjump_error("no block given", Qnil, 0);
|
rb_vm_localjump_error("no block given", Qnil, 0);
|
||||||
|
|
4
ruby.c
4
ruby.c
|
@ -1112,7 +1112,7 @@ true_value(void)
|
||||||
rb_define_virtual_variable((name), (val) ? true_value : false_value, 0)
|
rb_define_virtual_variable((name), (val) ? true_value : false_value, 0)
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
uscore_get()
|
uscore_get(void)
|
||||||
{
|
{
|
||||||
VALUE line;
|
VALUE line;
|
||||||
|
|
||||||
|
@ -1176,7 +1176,7 @@ rb_f_gsub(argc, argv)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
rb_f_chop()
|
rb_f_chop(void)
|
||||||
{
|
{
|
||||||
VALUE str = rb_funcall3(uscore_get(), rb_intern("chop"), 0, 0);
|
VALUE str = rb_funcall3(uscore_get(), rb_intern("chop"), 0, 0);
|
||||||
rb_lastline_set(str);
|
rb_lastline_set(str);
|
||||||
|
|
4
signal.c
4
signal.c
|
@ -515,7 +515,7 @@ sighandler(int sig)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
rb_signal_buff_size()
|
rb_signal_buff_size(void)
|
||||||
{
|
{
|
||||||
return signal_buff.size;
|
return signal_buff.size;
|
||||||
}
|
}
|
||||||
|
@ -1044,7 +1044,7 @@ init_sigchld(int sig)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
ruby_sig_finalize()
|
ruby_sig_finalize(void)
|
||||||
{
|
{
|
||||||
sighandler_t oldfunc;
|
sighandler_t oldfunc;
|
||||||
|
|
||||||
|
|
2
st.c
2
st.c
|
@ -145,7 +145,7 @@ static int collision = 0;
|
||||||
static int init_st = 0;
|
static int init_st = 0;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
stat_col()
|
stat_col(void)
|
||||||
{
|
{
|
||||||
FILE *f = fopen("/tmp/col", "w");
|
FILE *f = fopen("/tmp/col", "w");
|
||||||
fprintf(f, "collision: %d\n", collision);
|
fprintf(f, "collision: %d\n", collision);
|
||||||
|
|
6
thread.c
6
thread.c
|
@ -823,14 +823,14 @@ sleep_timeval(rb_thread_t *th, struct timeval tv)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
rb_thread_sleep_forever()
|
rb_thread_sleep_forever(void)
|
||||||
{
|
{
|
||||||
thread_debug("rb_thread_sleep_forever\n");
|
thread_debug("rb_thread_sleep_forever\n");
|
||||||
sleep_forever(GET_THREAD(), 0);
|
sleep_forever(GET_THREAD(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
rb_thread_sleep_deadly()
|
rb_thread_sleep_deadly(void)
|
||||||
{
|
{
|
||||||
thread_debug("rb_thread_sleep_deadly\n");
|
thread_debug("rb_thread_sleep_deadly\n");
|
||||||
sleep_forever(GET_THREAD(), 1);
|
sleep_forever(GET_THREAD(), 1);
|
||||||
|
@ -2010,7 +2010,7 @@ vm_living_thread_num(rb_vm_t *vm)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
rb_thread_alone()
|
rb_thread_alone(void)
|
||||||
{
|
{
|
||||||
int num = 1;
|
int num = 1;
|
||||||
if (GET_THREAD()->vm->living_threads) {
|
if (GET_THREAD()->vm->living_threads) {
|
||||||
|
|
Loading…
Reference in a new issue