[plt-scheme] Accessing struct types from C

From: Eli Barzilay (eli at barzilay.org)
Date: Wed Mar 26 16:32:54 EDT 2008

On Mar 26, Filipe Cabecinhas wrote:
> Hi
> 
> In my quest for non-variant COM arrays I want to use f32vectors to  
> create single-float arrays.
> My question is: how can I know I have an f32vector in hands? I was  
> thinking I could access the name of the structure type, but I don't  
> know if I can use the types defined in schpriv.h (Scheme_Struct_Type- 
>  >name->s, assuming it's a symbol) or are they only for private use  
> and I should use another API? The Inside MzScheme document isn't  
> hellping a lot when dealing with structures. I'll also take a look at  
> a (normal) Scheme vector with single floats (from foreign) and see how  
> I can identify them.

It's best to do this (the identification) in Scheme -- where you have
simple predicates for each of these values.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!


Posted on the users mailing list.