diff options
author | Lars Kanis <lars@greiz-reinsdorf.de> | 2023-04-19 09:19:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-19 09:19:37 +0200 |
commit | b1003b82599ff387598e612da1db9c513bed22b5 (patch) | |
tree | 93726d62232ab74c48cd03eea72fe452fb87ec57 /ext/ffi_c/AbstractMemory.c | |
parent | 51bfb061af4aeb6ba5413eba68369c20b93ce6fd (diff) | |
parent | 17da66de237520cd3b6c307cc051c53a738598d9 (diff) | |
download | ffi-b1003b82599ff387598e612da1db9c513bed22b5.tar.gz |
Merge pull request #1025 from peterzhu2118/pz-rarray-ptr
Remove use of RARRAY_PTR
Diffstat (limited to 'ext/ffi_c/AbstractMemory.c')
-rw-r--r-- | ext/ffi_c/AbstractMemory.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/ffi_c/AbstractMemory.c b/ext/ffi_c/AbstractMemory.c index 3cf16a7..10ddc28 100644 --- a/ext/ffi_c/AbstractMemory.c +++ b/ext/ffi_c/AbstractMemory.c @@ -150,7 +150,7 @@ memory_put_array_of_##name(VALUE self, VALUE offset, VALUE ary) \ if (likely(count > 0)) checkWrite(memory); \ checkBounds(memory, off, count * sizeof(type)); \ for (i = 0; i < count; i++) { \ - type tmp = (type) VAL(toNative(RARRAY_PTR(ary)[i]), swap); \ + type tmp = (type) VAL(toNative(RARRAY_AREF(ary, i)), swap); \ memcpy(memory->address + off + (i * sizeof(type)), &tmp, sizeof(tmp)); \ } \ return self; \ |