|
From: | Dan Leslie |
Subject: | Re: [Chicken-users] Best way to share memory between C and Chicken |
Date: | Fri, 03 May 2013 11:10:11 -0700 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 |
If it's heterogeneous data I tend to
use blobs with helper functions to cast segments to records
without undertaking a copy.
https://wiki.call-cc.org/man/4/Unit%20library#blobs If it's homogenous data then the srfi-4 unit provides all sorts of vectors that you can use. https://wiki.call-cc.org/man/4/Unit%20srfi-4 Keep in mind that foreign-lambdas will take blob and srfi-4 vectors as parameter types and convert them to their relevant C types without undertaking a copy. https://wiki.call-cc.org/man/4/Accessing%20external%20objects -Dan On 5/3/2013 11:04 AM, Pedro Melendez wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |