예제 #1
0
파일: moar.c 프로젝트: leedo/MoarVM
/* 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);
}
예제 #2
0
파일: fileops.c 프로젝트: Arcterus/MoarVM
MVMObject * MVM_file_get_stderr(MVMThreadContext *tc) {
    return MVM_file_get_stdstream(tc, 2);
}
예제 #3
0
파일: fileops.c 프로젝트: Arcterus/MoarVM
MVMObject * MVM_file_get_stdout(MVMThreadContext *tc) {
    return MVM_file_get_stdstream(tc, 1);
}