Subject: [ruby-ffi] Re: How to use native c-code's dynamic buffer pointer |
From: Wayne Meissner |
Date: 3/11/12 5:59 PM |
To: ruby-ffi@googlegroups.com |
Hi,
On c-code side it goes:
/* Declarations */
DATABLOCK *new_db ();
edit_db(DATABLOCK **db);
/* Usage */
db = new_db();
edit_db(&db);
How this goes on Ruby? https://github.com/ffi/ffi/wiki/Examples
mentions about MemoryPointer but on my case I already have that buffer
(created by new_db()), so how to pass reference to buffer for
edit_db() or how it should go?