/* Set up some standard file handles. */ static void setup_std_handles(MVMThreadContext *tc) { tc->instance->stdin_handle = MVM_file_get_stdstream(tc, 0, 1); MVM_gc_root_add_permanent(tc, (MVMCollectable **)&tc->instance->stdin_handle); tc->instance->stdout_handle = MVM_file_get_stdstream(tc, 1, 0); MVM_gc_root_add_permanent(tc, (MVMCollectable **)&tc->instance->stdout_handle); tc->instance->stderr_handle = MVM_file_get_stdstream(tc, 2, 0); MVM_gc_root_add_permanent(tc, (MVMCollectable **)&tc->instance->stderr_handle); }
MVMObject * MVM_file_get_stderr(MVMThreadContext *tc) { return MVM_file_get_stdstream(tc, 2); }
MVMObject * MVM_file_get_stdout(MVMThreadContext *tc) { return MVM_file_get_stdstream(tc, 1); }