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

ruby-changes:40374

From: nobu <ko1@a...>
Date: Thu, 5 Nov 2015 10:15:52 +0900 (JST)
Subject: [ruby-changes:40374] nobu:r52455 (trunk): tk: RARRAY_AREF

nobu	2015-11-05 10:15:45 +0900 (Thu, 05 Nov 2015)

  New Revision: 52455

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

  Log:
    tk: RARRAY_AREF
    
    * ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c (RARRAY_AREF): add
      fallback definition.

  Modified files:
    trunk/ext/tk/tcltklib.c
    trunk/ext/tk/tkutil/tkutil.c
Index: ext/tk/tcltklib.c
===================================================================
--- ext/tk/tcltklib.c	(revision 52454)
+++ ext/tk/tcltklib.c	(revision 52455)
@@ -45,6 +45,9 @@ int rb_thread_check_trap_pending(void); https://github.com/ruby/ruby/blob/trunk/ext/tk/tcltklib.c#L45
 #if !defined(RARRAY_CONST_PTR)
 #define RARRAY_CONST_PTR(s) (const VALUE *)RARRAY_PTR(s)
 #endif
+#if !defined(RARRAY_AREF)
+#define RARRAY_AREF(a, i) RARRAY_CONST_PTR(a)[i]
+#endif
 
 #ifdef OBJ_UNTRUST
 #define RbTk_OBJ_UNTRUST(x)  do {OBJ_TAINT(x); OBJ_UNTRUST(x);} while (0)
Index: ext/tk/tkutil/tkutil.c
===================================================================
--- ext/tk/tkutil/tkutil.c	(revision 52454)
+++ ext/tk/tkutil/tkutil.c	(revision 52455)
@@ -40,6 +40,9 @@ static int rb_thread_critical; /* dummy https://github.com/ruby/ruby/blob/trunk/ext/tk/tkutil/tkutil.c#L40
 #if !defined(RARRAY_CONST_PTR)
 #define RARRAY_CONST_PTR(s) (const VALUE *)RARRAY_PTR(s)
 #endif
+#if !defined(RARRAY_AREF)
+#define RARRAY_AREF(a, i) RARRAY_CONST_PTR(a)[i]
+#endif
 
 #if defined(HAVE_STRNDUP) && !defined(_GNU_SOURCE)
 extern char *strndup(const char* _ptr, size_t _len);

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

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