mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/win32ole/win32ole.c (OLE_FREE): should not call CoFreeUnuse-
dLibraries(). * ext/win32ole/win32ole.c (ole_event_free): ditto. * ext/win32ole/win32ole.c (ole_hresult2msg): truncate error message before CR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ba5b04cd1b
commit
29904b93f4
2 changed files with 18 additions and 9 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
Tue Jun 22 21:11:36 2004 Masaki Suketa <masaki.suketa@nifty.ne.jp>
|
||||||
|
|
||||||
|
* ext/win32ole/win32ole.c (OLE_FREE): should not call CoFreeUnuse-
|
||||||
|
dLibraries().
|
||||||
|
|
||||||
|
* ext/win32ole/win32ole.c (ole_event_free): ditto.
|
||||||
|
|
||||||
|
* ext/win32ole/win32ole.c (ole_hresult2msg): truncate error message
|
||||||
|
before CR.
|
||||||
|
|
||||||
Tue Jun 22 19:24:59 2004 NAKAMURA Usaku <usa@ruby-lang.org>
|
Tue Jun 22 19:24:59 2004 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* sprintf.c (rb_f_sprintf): unify output of NaN, Inf and -Inf with
|
* sprintf.c (rb_f_sprintf): unify output of NaN, Inf and -Inf with
|
||||||
|
|
|
@ -67,7 +67,6 @@
|
||||||
(x) = 0;\
|
(x) = 0;\
|
||||||
}\
|
}\
|
||||||
}\
|
}\
|
||||||
CoFreeUnusedLibraries();\
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define OLEData_Get_Struct(obj, pole) {\
|
#define OLEData_Get_Struct(obj, pole) {\
|
||||||
|
@ -79,7 +78,7 @@
|
||||||
|
|
||||||
#define WC2VSTR(x) ole_wc2vstr((x), TRUE)
|
#define WC2VSTR(x) ole_wc2vstr((x), TRUE)
|
||||||
|
|
||||||
#define WIN32OLE_VERSION "0.5.6"
|
#define WIN32OLE_VERSION "0.5.7"
|
||||||
|
|
||||||
typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX)
|
typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX)
|
||||||
(REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*);
|
(REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*);
|
||||||
|
@ -488,7 +487,8 @@ ole_hresult2msg(hr)
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
{
|
{
|
||||||
VALUE msg = Qnil;
|
VALUE msg = Qnil;
|
||||||
char *p_msg;
|
char *p_msg = NULL;
|
||||||
|
char *term = NULL;
|
||||||
DWORD dwCount;
|
DWORD dwCount;
|
||||||
|
|
||||||
char strhr[100];
|
char strhr[100];
|
||||||
|
@ -501,15 +501,15 @@ ole_hresult2msg(hr)
|
||||||
NULL, hr, LOCALE_SYSTEM_DEFAULT,
|
NULL, hr, LOCALE_SYSTEM_DEFAULT,
|
||||||
(LPTSTR)&p_msg, 0, NULL);
|
(LPTSTR)&p_msg, 0, NULL);
|
||||||
if (dwCount > 0) {
|
if (dwCount > 0) {
|
||||||
/* remove dots and CRs/LFs */
|
term = strrchr(p_msg, '\r');
|
||||||
while (dwCount > 0 &&
|
if (term) {
|
||||||
(p_msg[dwCount-1] < ' ' || p_msg[dwCount-1] == '.')) {
|
*term = '\0';
|
||||||
p_msg[--dwCount] = '\0';
|
|
||||||
}
|
}
|
||||||
if (p_msg[0] != '\0') {
|
if (p_msg[0] != '\0') {
|
||||||
rb_str_cat2(msg, p_msg);
|
rb_str_cat2(msg, p_msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LocalFree(p_msg);
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5341,7 +5341,6 @@ ole_event_free(poleev)
|
||||||
pcp->lpVtbl->Unadvise(pcp, poleev->pEvent->m_dwCookie);
|
pcp->lpVtbl->Unadvise(pcp, poleev->pEvent->m_dwCookie);
|
||||||
OLE_RELEASE(pcp);
|
OLE_RELEASE(pcp);
|
||||||
}
|
}
|
||||||
CoFreeUnusedLibraries();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue