From 16318ed2acedb9e493d81d2da190c7ef73894580 Mon Sep 17 00:00:00 2001 From: usa Date: Fri, 12 Nov 2004 06:06:15 +0000 Subject: * eval.c (ruby_options): now we cannot call rb_glob() before ruby_init(), so call rb_w32_cmdvector() at ruby_options(). * win32.{c,h} (rb_w32_cmdvector): rename make_cmdvector() and export it. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'eval.c') diff --git a/eval.c b/eval.c index b6ea4f2f0..f32e44c4a 100644 --- a/eval.c +++ b/eval.c @@ -1366,6 +1366,10 @@ ruby_options(argc, argv) { int state; +#ifdef _WIN32 + argc = rb_w32_cmdvector(GetCommandLine(), &argv); +#endif + Init_stack((void*)&state); PUSH_TAG(PROT_NONE); if ((state = EXEC_TAG()) == 0) { @@ -1377,6 +1381,11 @@ ruby_options(argc, argv) exit(error_handle(state)); } POP_TAG(); + +#ifdef _WIN32_WCE + // free commandline buffer + wce_FreeCommandLine(); +#endif } void rb_exec_end_proc _((void)); -- cgit