|
From: | Eduardo Cavazos |
Subject: | [Chicken-users] blob or f64vector |
Date: | Wed, 25 Feb 2009 10:34:02 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.16) Gecko/20080716 SeaMonkey/1.1.11 |
Eduardo Cavazos wrote:
>
What could I change that to such that blobs are allowed as the second argument?
Jim Ursetto wrote:
void glGetDoublev( GLenum pname, ___byte_vector params ); (The egg should probably be updated to replace or alias ___blob to ___byte_vector...)
This did the trick. But I have another question...In easy ffi, if a function parameter type is 'double', then it expects you to pass a SRFI-4 'f64vector'. Under the covers, this is just a blob. So my question was about how to pass a blob directly. And all is well.
My new question is, is there a way to specify a type such that the function will accept a blob *or* some SRFI-4 vector? I.e. if you pass a SRFI-4 vector, you'll benefit from the nice type checking. If you pass a blob, it works but you don't get the type checking.
For example, if the type of a parameter is 'double', the ffi check goes as follows. If the argument is a blob, it's sent directly. Otherwise it *must* be an f64vector. Something along those lines.
Ed
[Prev in Thread] | Current Thread | [Next in Thread] |