A C-style array is written `*T`, much like in C (note: I'm not saying
`T*` and `T[]` are the same type, I know they aren't)

On Sat, Apr 5, 2014 at 6:53 AM, Simon Sapin <simon.sa...@exyr.org> wrote:
> On 05/04/2014 11:39, Vladimir Pouzanov wrote:
>>
>> The problem is that &[extern unsafe fn()] results in 8 bytes, pointer to
>> the actual array and its size. Is there any way I can get a plain
>> C-style array in rust?
>
>
> If the size is known as compile-time you can use:
>
> static table: [extern unsafe fn(), ..2] = [foo, bar];
>
> --
> Simon Sapin
>
> _______________________________________________
> Rust-dev mailing list
> Rust-dev@mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev



-- 
http://octayn.net/
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to