ruby-changes:35072
From: suke <ko1@a...>
Date: Tue, 12 Aug 2014 23:01:21 +0900 (JST)
Subject: [ruby-changes:35072] suke:r47154 (trunk): * ext/win32ole/win32ole.c: refactoring. move
suke 2014-08-12 23:00:45 +0900 (Tue, 12 Aug 2014) New Revision: 47154 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47154 Log: * ext/win32ole/win32ole.c: refactoring. move ole_typelib_from_itypeinfo into win32ole_typelib.c. * ext/win32ole/win32ole.h: ditto. * ext/win32ole/win32ole_typelib.h: ditto. * ext/win32ole/win32ole_typelib.h: ditto. Modified files: trunk/ChangeLog trunk/ext/win32ole/win32ole.c trunk/ext/win32ole/win32ole.h trunk/ext/win32ole/win32ole_typelib.c trunk/ext/win32ole/win32ole_typelib.h Index: ChangeLog =================================================================== --- ChangeLog (revision 47153) +++ ChangeLog (revision 47154) @@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Aug 12 22:59:48 2014 Masaki Suketa <masaki.suketa@n...> + + * ext/win32ole/win32ole.c: refactoring. move + ole_typelib_from_itypeinfo into win32ole_typelib.c. + * ext/win32ole/win32ole.h: ditto. + * ext/win32ole/win32ole_typelib.h: ditto. + * ext/win32ole/win32ole_typelib.h: ditto. + Tue Aug 12 21:49:40 2014 Masaki Suketa <masaki.suketa@n...> * ext/win32ole/win32ole.c (ole_create_dcom): use the converted Index: ext/win32ole/win32ole_typelib.h =================================================================== --- ext/win32ole/win32ole_typelib.h (revision 47153) +++ ext/win32ole/win32ole_typelib.h (revision 47154) @@ -7,4 +7,5 @@ void Init_win32ole_typelib(); https://github.com/ruby/ruby/blob/trunk/ext/win32ole/win32ole_typelib.h#L7 ITypeLib * itypelib(VALUE self); VALUE typelib_file(VALUE ole); VALUE create_win32ole_typelib(ITypeLib *pTypeLib); +VALUE ole_typelib_from_itypeinfo(ITypeInfo *pTypeInfo); #endif Index: ext/win32ole/win32ole.c =================================================================== --- ext/win32ole/win32ole.c (revision 47153) +++ ext/win32ole/win32ole.c (revision 47154) @@ -3962,22 +3962,6 @@ fole_type(VALUE self) https://github.com/ruby/ruby/blob/trunk/ext/win32ole/win32ole.c#L3962 return type; } -VALUE -ole_typelib_from_itypeinfo(ITypeInfo *pTypeInfo) -{ - HRESULT hr; - ITypeLib *pTypeLib; - unsigned int index; - VALUE retval = Qnil; - - hr = pTypeInfo->lpVtbl->GetContainingTypeLib(pTypeInfo, &pTypeLib, &index); - if(FAILED(hr)) { - return Qnil; - } - retval = create_win32ole_typelib(pTypeLib); - return retval; -} - /* * call-seq: * WIN32OLE#ole_typelib -> The WIN32OLE_TYPELIB object Index: ext/win32ole/win32ole.h =================================================================== --- ext/win32ole/win32ole.h (revision 47153) +++ ext/win32ole/win32ole.h (revision 47154) @@ -115,7 +115,6 @@ VALUE ole_wc2vstr(LPWSTR pw, BOOL isfree https://github.com/ruby/ruby/blob/trunk/ext/win32ole/win32ole.h#L115 BOOL ole_initialized(); HRESULT ole_docinfo_from_type(ITypeInfo *pTypeInfo, BSTR *name, BSTR *helpstr, DWORD *helpcontext, BSTR *helpfile); VALUE ole_typedesc2val(ITypeInfo *pTypeInfo, TYPEDESC *pTypeDesc, VALUE typedetails); -VALUE ole_typelib_from_itypeinfo(ITypeInfo *pTypeInfo); VALUE ole_type_from_itypeinfo(ITypeInfo *pTypeInfo); VALUE make_inspect(const char *class_name, VALUE detail); VALUE ole_variant2val(VARIANT *pvar); Index: ext/win32ole/win32ole_typelib.c =================================================================== --- ext/win32ole/win32ole_typelib.c (revision 47153) +++ ext/win32ole/win32ole_typelib.c (revision 47154) @@ -103,6 +103,22 @@ itypelib(VALUE self) https://github.com/ruby/ruby/blob/trunk/ext/win32ole/win32ole_typelib.c#L103 return ptlib->pTypeLib; } +VALUE +ole_typelib_from_itypeinfo(ITypeInfo *pTypeInfo) +{ + HRESULT hr; + ITypeLib *pTypeLib; + unsigned int index; + VALUE retval = Qnil; + + hr = pTypeInfo->lpVtbl->GetContainingTypeLib(pTypeInfo, &pTypeLib, &index); + if(FAILED(hr)) { + return Qnil; + } + retval = create_win32ole_typelib(pTypeLib); + return retval; +} + /* * Document-class: WIN32OLE_TYPELIB * -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/