If you try to build a direct-*-array off a straight byte-array, you  
get a type error:

Bad store to specialized slot
"value" B{ 0 0 128 63 0 0 0 64 0 0 64 64 }
"class" alien

You can get around this by saying "0 swap <displaced-alien>" before  
calling <direct-*-array> to wrap the byte-array in an alien (or no-op  
an object that's already an alien), but that shouldn't be necessary.  
That adds another three words to any code that needs to treat an  
arbitrary memory buffer as a packed array, and the underlying  
implementation of direct-*-array should work with either kind of  
object without wrapping. Is there a class the "underlying" slot can be  
specialized to that would allow both aliens and byte-arrays?

-Joe

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to