Subject: [ruby-ffi] How to use native c-code's dynamic buffer pointer |
From: MJoutsi |
Date: 3/10/12 4:14 PM |
To: ruby-ffi |
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?