1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/main.c
nobu 400202f6a5 * main.c (main): use platform-independent per-process initialization.
[ruby-dev:31900]

* ruby.c (ruby_sysinit): new function for per-process initialization.

* include/ruby/ruby.h (RUBY_GLOBAL_SETUP): toplevel setup declaration.

* include/ruby/win32.h, win32/mkexports.rb: alias NtInitialize
  ruby_sysinit.

* win32/win32.c (rb_w32_sysinit): renamed from NtInitialize.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-29 08:45:24 +00:00

32 lines
636 B
C

/**********************************************************************
main.c -
$Author$
$Date$
created at: Fri Aug 19 13:19:58 JST 1994
Copyright (C) 1993-2007 Yukihiro Matsumoto
**********************************************************************/
#undef RUBY_EXPORT
#include "ruby/ruby.h"
RUBY_GLOBAL_SETUP
int
main(int argc, char **argv, char **envp)
{
#ifdef RUBY_DEBUG_ENV
extern void ruby_set_debug_option(const char *);
ruby_set_debug_option(getenv("RUBY_DEBUG"));
#endif
ruby_sysinit(&argc, &argv);
{
RUBY_INIT_STACK;
ruby_init();
return ruby_run_node(ruby_options(argc, argv));
}
}