@@ -232,6 +232,7 @@ static void ruby_vim_init(void);
232232# define rb_define_singleton_method dll_rb_define_singleton_method
233233# define rb_define_virtual_variable dll_rb_define_virtual_variable
234234# define rb_stdout (*dll_rb_stdout)
235+ # define rb_stderr (*dll_rb_stderr)
235236# define rb_eArgError (*dll_rb_eArgError)
236237# define rb_eIndexError (*dll_rb_eIndexError)
237238# define rb_eRuntimeError (*dll_rb_eRuntimeError)
@@ -360,6 +361,7 @@ static void (*dll_rb_define_module_function) (VALUE,const char*,VALUE(*)(),int);
360361static void (* dll_rb_define_singleton_method ) (VALUE ,const char * ,VALUE (* )(),int );
361362static void (* dll_rb_define_virtual_variable ) (const char * ,VALUE (* )(),void (* )());
362363static VALUE * dll_rb_stdout ;
364+ static VALUE * dll_rb_stderr ;
363365static VALUE * dll_rb_eArgError ;
364366static VALUE * dll_rb_eIndexError ;
365367static VALUE * dll_rb_eRuntimeError ;
@@ -553,6 +555,7 @@ static struct
553555 {"rb_define_singleton_method" , (RUBY_PROC * )& dll_rb_define_singleton_method },
554556 {"rb_define_virtual_variable" , (RUBY_PROC * )& dll_rb_define_virtual_variable },
555557 {"rb_stdout" , (RUBY_PROC * )& dll_rb_stdout },
558+ {"rb_stderr" , (RUBY_PROC * )& dll_rb_stderr },
556559 {"rb_eArgError" , (RUBY_PROC * )& dll_rb_eArgError },
557560 {"rb_eIndexError" , (RUBY_PROC * )& dll_rb_eIndexError },
558561 {"rb_eRuntimeError" , (RUBY_PROC * )& dll_rb_eRuntimeError },
@@ -1542,11 +1545,15 @@ static void ruby_io_init(void)
15421545{
15431546#ifndef DYNAMIC_RUBY
15441547 RUBYEXTERN VALUE rb_stdout ;
1548+ RUBYEXTERN VALUE rb_stderr ;
15451549#endif
15461550
15471551 rb_stdout = rb_obj_alloc (rb_cObject );
1552+ rb_stderr = rb_obj_alloc (rb_cObject );
15481553 rb_define_singleton_method (rb_stdout , "write" , vim_message , 1 );
15491554 rb_define_singleton_method (rb_stdout , "flush" , f_nop , 0 );
1555+ rb_define_singleton_method (rb_stderr , "write" , vim_message , 1 );
1556+ rb_define_singleton_method (rb_stderr , "flush" , f_nop , 0 );
15501557 rb_define_global_function ("p" , f_p , -1 );
15511558}
15521559
0 commit comments