On Thu, Dec 4, 2008 at 11:52 AM, Joe Groff <[EMAIL PROTECTED]> wrote:
> 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

This was an oversight on my part. I pushed a fix.

> Is there a class the "underlying" slot can be
> specialized to that would allow both aliens and byte-arrays?

The c-ptr class is a union of alien, byte-array, and f. It is what we
want in this case.

FWIW, if you _know_ you have a byte array, use byte-array>T-array
instead of <direct-T-array>. There is a marginal efficiency gain, and
you don't have to supply the length. But in any case, direct arrays
should now work for this use case.

Slava

-------------------------------------------------------------------------
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