[前][次][番号順一覧][スレッド一覧]

ruby-changes:35697

From: suke <ko1@a...>
Date: Sat, 4 Oct 2014 06:09:14 +0900 (JST)
Subject: [ruby-changes:35697] suke:r47779 (trunk): ext/win32ole/win32ole_method.c(olemethod_set_member): remove

suke	2014-10-04 06:08:55 +0900 (Sat, 04 Oct 2014)

  New Revision: 47779

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47779

  Log:
    ext/win32ole/win32ole_method.c(olemethod_set_member): remove
    redundant NULL check.
    ext/win32ole/win32ole_type.c(oletype_set_member): ditto.

  Modified files:
    trunk/ChangeLog
    trunk/ext/win32ole/win32ole_method.c
    trunk/ext/win32ole/win32ole_type.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 47778)
+++ ChangeLog	(revision 47779)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Oct  4 06:04:56 2014  Masaki Suketa <masaki.suketa@n...>
+
+	* ext/win32ole/win32ole_method.c(olemethod_set_member): remove
+	  redundant NULL check.
+	* ext/win32ole/win32ole_type.c(oletype_set_member): ditto.
+
 Sat Oct  4 00:25:04 2014  SHIBATA Hiroshi  <shibata.hiroshi@g...>
 
 	* .travis.yml: removed needless preparation for gcc.
Index: ext/win32ole/win32ole_method.c
===================================================================
--- ext/win32ole/win32ole_method.c	(revision 47778)
+++ ext/win32ole/win32ole_method.c	(revision 47779)
@@ -207,7 +207,7 @@ olemethod_set_member(VALUE self, ITypeIn https://github.com/ruby/ruby/blob/trunk/ext/win32ole/win32ole_method.c#L207
     pmethod->pTypeInfo = pTypeInfo;
     OLE_ADDREF(pTypeInfo);
     pmethod->pOwnerTypeInfo = pOwnerTypeInfo;
-    if(pOwnerTypeInfo) OLE_ADDREF(pOwnerTypeInfo);
+    OLE_ADDREF(pOwnerTypeInfo);
     pmethod->index = index;
     rb_ivar_set(self, rb_intern("name"), name);
     return self;
Index: ext/win32ole/win32ole_type.c
===================================================================
--- ext/win32ole/win32ole_type.c	(revision 47778)
+++ ext/win32ole/win32ole_type.c	(revision 47779)
@@ -188,7 +188,7 @@ oletype_set_member(VALUE self, ITypeInfo https://github.com/ruby/ruby/blob/trunk/ext/win32ole/win32ole_type.c#L188
     TypedData_Get_Struct(self, struct oletypedata, &oletype_datatype, ptype);
     rb_ivar_set(self, rb_intern("name"), name);
     ptype->pTypeInfo = pTypeInfo;
-    if(pTypeInfo) OLE_ADDREF(pTypeInfo);
+    OLE_ADDREF(pTypeInfo);
     return self;
 }
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]