зеркало из https://github.com/github/ruby.git
* ext/extmk.rb: Makefiles should depend on also rbconfig.rb.
(ruby-bugs:PR#1256) * ext/win32ole/win32ole.c (set_argv): set real arguments to WIN32OLE::ARGV. [ruby-list:39073] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
c88e3627cf
Коммит
6e0b3ca606
|
@ -1,3 +1,11 @@
|
|||
Mon Jan 26 11:30:58 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/extmk.rb: Makefiles should depend on also rbconfig.rb.
|
||||
(ruby-bugs:PR#1256)
|
||||
|
||||
* ext/win32ole/win32ole.c (set_argv): set real arguments to
|
||||
WIN32OLE::ARGV. [ruby-list:39073]
|
||||
|
||||
Sun Jan 25 18:25:26 2004 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
||||
|
||||
* ext/openssl/ossl_x509name.c (ossl_x509name_add_entry): third
|
||||
|
|
|
@ -186,7 +186,7 @@ end
|
|||
$ruby << " -I$(topdir) -I$(hdrdir)/lib"
|
||||
$config_h = '$(topdir)/config.h'
|
||||
|
||||
MTIMES = [__FILE__, srcdir+'/lib/mkmf.rb'].collect {|f| File.mtime(f)}
|
||||
MTIMES = [__FILE__, 'rbconfig.rb', srcdir+'/lib/mkmf.rb'].collect {|f| File.mtime(f)}
|
||||
|
||||
# get static-link modules
|
||||
$static_ext = {}
|
||||
|
|
|
@ -5,11 +5,13 @@
|
|||
#----------------------------------
|
||||
require 'mkmf'
|
||||
|
||||
dir_config("win32")
|
||||
def create_win32ole_makefile
|
||||
if have_library("ole32") and
|
||||
have_library("oleaut32") and
|
||||
have_library("uuid") and
|
||||
have_library("user32") and
|
||||
have_library("kernel32") and
|
||||
have_library("advapi32") and
|
||||
have_header("windows.h")
|
||||
create_makefile("win32ole")
|
||||
|
|
|
@ -1685,6 +1685,22 @@ hash2named_arg(pair, pOp)
|
|||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
set_argv(realargs, beg, end)
|
||||
VARIANTARG* realargs;
|
||||
unsigned int beg, end;
|
||||
{
|
||||
VALUE argv = rb_const_get(cWIN32OLE, rb_intern("ARGV"));
|
||||
|
||||
Check_Type(argv, T_ARRAY);
|
||||
rb_ary_clear(argv);
|
||||
while (--end >= beg) {
|
||||
rb_ary_push(argv, ole_variant2val(&realargs[end]));
|
||||
VariantClear(&realargs[end]);
|
||||
}
|
||||
return argv;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
ole_invoke(argc, argv, self, wFlags)
|
||||
int argc;
|
||||
|
@ -1707,7 +1723,6 @@ ole_invoke(argc, argv, self, wFlags)
|
|||
DISPID* pDispID;
|
||||
EXCEPINFO excepinfo;
|
||||
VARIANT result;
|
||||
VALUE args;
|
||||
VARIANTARG* realargs = NULL;
|
||||
unsigned int argErr = 0;
|
||||
unsigned int i;
|
||||
|
@ -1847,13 +1862,7 @@ ole_invoke(argc, argv, self, wFlags)
|
|||
}
|
||||
/* clear dispatch parameter */
|
||||
if(op.dp.cArgs > cNamedArgs) {
|
||||
args = rb_cvar_get(cWIN32OLE, rb_intern("ARGV"));
|
||||
rb_funcall(args, rb_intern("clear"), 0);
|
||||
for(i = cNamedArgs; i < op.dp.cArgs; i++) {
|
||||
n = op.dp.cArgs - i + cNamedArgs - 1;
|
||||
rb_ary_push(args, ole_variant2val(&realargs[n]));
|
||||
VariantClear(&realargs[n]);
|
||||
}
|
||||
set_argv(realargs, cNamedArgs, op.dp.cArgs);
|
||||
}
|
||||
else {
|
||||
for(i = 0; i < op.dp.cArgs; i++) {
|
||||
|
@ -2066,12 +2075,7 @@ ole_invoke2(self, dispid, args, types, dispkind)
|
|||
|
||||
/* clear dispatch parameter */
|
||||
if(dispParams.cArgs > 0) {
|
||||
VALUE argv = rb_cvar_get(cWIN32OLE, rb_intern("ARGV"));
|
||||
rb_funcall(argv, rb_intern("clear"), 0);
|
||||
for(i = dispParams.cArgs - 1; i >= 0; i--) {
|
||||
rb_ary_push(argv, ole_variant2val(&realargs[i]));
|
||||
VariantClear(&realargs[i]);
|
||||
}
|
||||
set_argv(realargs, 0, dispParams.cArgs);
|
||||
}
|
||||
|
||||
obj = ole_variant2val(&result);
|
||||
|
|
Загрузка…
Ссылка в новой задаче