* ext/win32ole/win32ole.c(ole_const_load): suppress constant redefinition
warnings when WIN32OLE.const_load [Bug #14085] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e16bd0f4d8
commit
856aca46b7
@ -26,7 +26,7 @@
|
|||||||
const IID IID_IMultiLanguage2 = {0xDCCFC164, 0x2B38, 0x11d2, {0xB7, 0xEC, 0x00, 0xC0, 0x4F, 0x8F, 0x5D, 0x9A}};
|
const IID IID_IMultiLanguage2 = {0xDCCFC164, 0x2B38, 0x11d2, {0xB7, 0xEC, 0x00, 0xC0, 0x4F, 0x8F, 0x5D, 0x9A}};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define WIN32OLE_VERSION "1.8.6"
|
#define WIN32OLE_VERSION "1.8.7"
|
||||||
|
|
||||||
typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX)
|
typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX)
|
||||||
(REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*);
|
(REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*);
|
||||||
@ -1809,7 +1809,9 @@ ole_const_load(ITypeLib *pTypeLib, VALUE klass, VALUE self)
|
|||||||
*pName = toupper((int)*pName);
|
*pName = toupper((int)*pName);
|
||||||
id = rb_intern(pName);
|
id = rb_intern(pName);
|
||||||
if (rb_is_const_id(id)) {
|
if (rb_is_const_id(id)) {
|
||||||
rb_define_const(klass, pName, val);
|
if(!rb_const_defined_at(klass, id)) {
|
||||||
|
rb_define_const(klass, pName, val);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rb_hash_aset(constant, rb_str_new2(pName), val);
|
rb_hash_aset(constant, rb_str_new2(pName), val);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user