summaryrefslogtreecommitdiff
path: root/ext/tk/tcltklib.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/tcltklib.c')
-rw-r--r--ext/tk/tcltklib.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c
index fed21d3709..c99bcb5e3d 100644
--- a/ext/tk/tcltklib.c
+++ b/ext/tk/tcltklib.c
@@ -1892,15 +1892,15 @@ set_max_block_time(self, time)
case T_BIGNUM:
/* time is micro-second value */
divmod = rb_funcall(time, rb_intern("divmod"), 1, LONG2NUM(1000000));
- tcl_time.sec = NUM2LONG(RARRAY_CONST_PTR(divmod)[0]);
- tcl_time.usec = NUM2LONG(RARRAY_CONST_PTR(divmod)[1]);
+ tcl_time.sec = NUM2LONG(RARRAY_AREF(divmod, 0));
+ tcl_time.usec = NUM2LONG(RARRAY_AREF(divmod, 1));
break;
case T_FLOAT:
/* time is second value */
divmod = rb_funcall(time, rb_intern("divmod"), 1, INT2FIX(1));
- tcl_time.sec = NUM2LONG(RARRAY_CONST_PTR(divmod)[0]);
- tcl_time.usec = (long)(NUM2DBL(RARRAY_CONST_PTR(divmod)[1]) * 1000000);
+ tcl_time.sec = NUM2LONG(RARRAY_AREF(divmod, 0));
+ tcl_time.usec = (long)(NUM2DBL(RARRAY_AREF(divmod, 1)) * 1000000);
default:
{
@@ -7213,7 +7213,7 @@ tk_funcall(func, argc, argv, obj)
DUMP2("back from handler (current thread:%"PRIxVALUE")", current);
/* get result & free allocated memory */
- ret = RARRAY_CONST_PTR(result)[0];
+ ret = RARRAY_AREF(result, 0);
#if 0 /* use Tcl_EventuallyFree */
Tcl_EventuallyFree((ClientData)alloc_done, TCL_DYNAMIC); /* XXXXXXXX */
#else
@@ -7697,7 +7697,7 @@ ip_eval(self, str)
DUMP2("back from handler (current thread:%"PRIxVALUE")", current);
/* get result & free allocated memory */
- ret = RARRAY_CONST_PTR(result)[0];
+ ret = RARRAY_AREF(result, 0);
#if 0 /* use Tcl_EventuallyFree */
Tcl_EventuallyFree((ClientData)alloc_done, TCL_DYNAMIC); /* XXXXXXXX */
@@ -9196,7 +9196,7 @@ ip_invoke_with_position(argc, argv, obj, position)
DUMP2("back from handler (current thread:%"PRIxVALUE")", current);
/* get result & free allocated memory */
- ret = RARRAY_CONST_PTR(result)[0];
+ ret = RARRAY_AREF(result, 0);
#if 0 /* use Tcl_EventuallyFree */
Tcl_EventuallyFree((ClientData)alloc_done, TCL_DYNAMIC); /* XXXXXXXX */
#else