If I understand correctly, the problem is that using "Obj.magic 0" as
a null causes a segfault. It is because de-reference occurs when
inserting floats into float arrays.
If it is true, then Michal Moskal's approach seems most elegant to
me. (using "ref 0.0" as a null value.) If relying the fact that
references and boxed floats are same structures is not acceptable, you
can test whether the given array is a float array by looking its block
tag. The test is needed only in creation and resizing. (Though you
may think theses options already.)
--
Yamagata Yoriyuki
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
|