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

ruby-changes:35002

From: suke <ko1@a...>
Date: Wed, 6 Aug 2014 20:10:13 +0900 (JST)
Subject: [ruby-changes:35002] suke:r47084 (trunk): * ext/win32ole/win32ole.c (olerecord_ivar_set): remove rb_str_subseq.

suke	2014-08-06 20:09:59 +0900 (Wed, 06 Aug 2014)

  New Revision: 47084

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

  Log:
    * ext/win32ole/win32ole.c (olerecord_ivar_set): remove rb_str_subseq.

  Modified files:
    trunk/ChangeLog
    trunk/ext/win32ole/win32ole.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 47083)
+++ ChangeLog	(revision 47084)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Aug  6 20:07:26 2014  Masaki Suketa <masaki.suketa@n...>
+
+	* ext/win32ole/win32ole.c (olerecord_ivar_set): remove rb_str_subseq.
+
 Wed Aug  6 19:09:27 2014  Akinori MUSHA  <knu@i...>
 
 	* lib/set.rb (Set): Implement Set#clone by splitting
Index: ext/win32ole/win32ole.c
===================================================================
--- ext/win32ole/win32ole.c	(revision 47083)
+++ ext/win32ole/win32ole.c	(revision 47084)
@@ -63,7 +63,7 @@ const IID IID_IMultiLanguage2 = {0xDCCFC https://github.com/ruby/ruby/blob/trunk/ext/win32ole/win32ole.c#L63
 
 #define WC2VSTR(x) ole_wc2vstr((x), TRUE)
 
-#define WIN32OLE_VERSION "1.7.3"
+#define WIN32OLE_VERSION "1.7.4"
 
 typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX)
     (REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*);
@@ -9428,12 +9428,10 @@ olerecord_ivar_set(VALUE self, VALUE nam https://github.com/ruby/ruby/blob/trunk/ext/win32ole/win32ole.c#L9428
 {
     long len;
     char *p;
-    VALUE ch;
     VALUE fields;
     len  = RSTRING_LEN(name);
-    ch = rb_str_subseq(name, len-1, 1);
-    p = RSTRING_PTR(ch);
-    if (*p == '=') {
+    p = RSTRING_PTR(name);
+    if (p[len-1] == '=') {
         name = rb_str_subseq(name, 0, len-1);
     }
     fields = rb_ivar_get(self, rb_intern("fields"));

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

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