ring-buffer with-cffi-ptrs macro used to factor out mem-cpy call macro