зеркало из https://github.com/github/ruby.git
win32ole.c: share the content
* ext/win32ole/win32ole.c (fole_missing): make substring or dup to share the content if possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
2eb1ec25d1
Коммит
27c13f82b9
|
@ -1,3 +1,8 @@
|
||||||
|
Fri May 20 21:17:13 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/win32ole/win32ole.c (fole_missing): make substring or dup to
|
||||||
|
share the content if possible.
|
||||||
|
|
||||||
Fri May 20 19:48:48 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Fri May 20 19:48:48 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* internal.h (NEW_PARTIAL_MEMO_FOR): shrink buffer array not to
|
* internal.h (NEW_PARTIAL_MEMO_FOR): shrink buffer array not to
|
||||||
|
|
|
@ -3303,12 +3303,12 @@ fole_missing(int argc, VALUE *argv, VALUE self)
|
||||||
n = RSTRING_LEN(mid);
|
n = RSTRING_LEN(mid);
|
||||||
if(mname[n-1] == '=') {
|
if(mname[n-1] == '=') {
|
||||||
rb_check_arity(argc, 2, 2);
|
rb_check_arity(argc, 2, 2);
|
||||||
argv[0] = rb_enc_str_new(mname, (n-1), cWIN32OLE_enc);
|
argv[0] = rb_enc_associate(rb_str_subseq(mid, 0, n-1), cWIN32OLE_enc);
|
||||||
|
|
||||||
return ole_propertyput(self, argv[0], argv[1]);
|
return ole_propertyput(self, argv[0], argv[1]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
argv[0] = rb_enc_str_new(mname, n, cWIN32OLE_enc);
|
argv[0] = rb_enc_associate(rb_str_dup(mid), cWIN32OLE_enc);
|
||||||
return ole_invoke(argc, argv, self, DISPATCH_METHOD|DISPATCH_PROPERTYGET, FALSE);
|
return ole_invoke(argc, argv, self, DISPATCH_METHOD|DISPATCH_PROPERTYGET, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче