mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
adjust style
* thread_pthread.c, vm_eval.c: adjust style. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
99e63fba29
commit
4ef43fc02f
2 changed files with 9 additions and 4 deletions
|
@ -1229,7 +1229,8 @@ static pthread_mutex_t timer_thread_lock;
|
||||||
static rb_thread_cond_t timer_thread_cond;
|
static rb_thread_cond_t timer_thread_cond;
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
timer_thread_sleep(rb_global_vm_lock_t* unused) {
|
timer_thread_sleep(rb_global_vm_lock_t* unused)
|
||||||
|
{
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
ts.tv_sec = 0;
|
ts.tv_sec = 0;
|
||||||
ts.tv_nsec = TIME_QUANTUM_USEC * 1000;
|
ts.tv_nsec = TIME_QUANTUM_USEC * 1000;
|
||||||
|
|
10
vm_eval.c
10
vm_eval.c
|
@ -1158,7 +1158,8 @@ rb_f_eval(int argc, VALUE *argv, VALUE self)
|
||||||
|
|
||||||
/** @note This function name is not stable. */
|
/** @note This function name is not stable. */
|
||||||
VALUE
|
VALUE
|
||||||
ruby_eval_string_from_file(const char *str, const char *filename) {
|
ruby_eval_string_from_file(const char *str, const char *filename)
|
||||||
|
{
|
||||||
return eval_string(rb_vm_top_self(), rb_str_new2(str), Qnil, filename, 1);
|
return eval_string(rb_vm_top_self(), rb_str_new2(str), Qnil, filename, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1166,14 +1167,17 @@ struct eval_string_from_file_arg {
|
||||||
const char *str;
|
const char *str;
|
||||||
const char *filename;
|
const char *filename;
|
||||||
};
|
};
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
eval_string_from_file_helper(void *data) {
|
eval_string_from_file_helper(void *data)
|
||||||
|
{
|
||||||
const struct eval_string_from_file_arg *const arg = (struct eval_string_from_file_arg*)data;
|
const struct eval_string_from_file_arg *const arg = (struct eval_string_from_file_arg*)data;
|
||||||
return eval_string(rb_vm_top_self(), rb_str_new2(arg->str), Qnil, arg->filename, 1);
|
return eval_string(rb_vm_top_self(), rb_str_new2(arg->str), Qnil, arg->filename, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
VALUE
|
VALUE
|
||||||
ruby_eval_string_from_file_protect(const char *str, const char *filename, int *state) {
|
ruby_eval_string_from_file_protect(const char *str, const char *filename, int *state)
|
||||||
|
{
|
||||||
struct eval_string_from_file_arg arg;
|
struct eval_string_from_file_arg arg;
|
||||||
arg.str = str;
|
arg.str = str;
|
||||||
arg.filename = filename;
|
arg.filename = filename;
|
||||||
|
|
Loading…
Add table
Reference in a new issue