From 63aafb2004937c5ec8f514dc317833f791f205a1 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 25 Nov 2014 03:14:45 +0000 Subject: [PATCH] process.c: initialize static IDs first * process.c (Init_process): initialize static IDs before constant definitions. [ruby-core:66445] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ process.c | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0a3377696d..ef6cd31fe4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Nov 25 12:14:43 2014 Nobuyoshi Nakada + + * process.c (Init_process): initialize static IDs before constant + definitions. [ruby-core:66445] + Tue Nov 25 10:32:23 2014 Eric Wong * compile.c (iseq_build_callinfo_from_hash): hoist out diff --git a/process.c b/process.c index a4de704ce6..cc2f33611c 100644 --- a/process.c +++ b/process.c @@ -7519,7 +7519,7 @@ VALUE rb_mProcID_Syscall; */ void -Init_process(void) +InitVM_process(void) { #undef rb_intern #define rb_intern(str) rb_intern_const(str) @@ -7899,7 +7899,11 @@ Init_process(void) rb_define_module_function(rb_mProcID_Syscall, "setresuid", p_sys_setresuid, 3); rb_define_module_function(rb_mProcID_Syscall, "setresgid", p_sys_setresgid, 3); rb_define_module_function(rb_mProcID_Syscall, "issetugid", p_sys_issetugid, 0); +} +void +Init_process(void) +{ id_in = rb_intern("in"); id_out = rb_intern("out"); id_err = rb_intern("err"); @@ -7941,4 +7945,6 @@ Init_process(void) id_MACH_ABSOLUTE_TIME_BASED_CLOCK_MONOTONIC = rb_intern("MACH_ABSOLUTE_TIME_BASED_CLOCK_MONOTONIC"); #endif id_hertz = rb_intern("hertz"); + + InitVM(process); }