1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

tk: RARRAY_AREF

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-11-05 01:15:45 +00:00
parent 4d21e6aac0
commit d2e48a3f01
2 changed files with 6 additions and 0 deletions

View file

@ -45,6 +45,9 @@ int rb_thread_check_trap_pending(void);
#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)

View file

@ -40,6 +40,9 @@ static int rb_thread_critical; /* dummy */
#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);