Hacker News new | past | comments | ask | show | jobs | submit login

Maybe it is just me, but whenever I come across a type as ugly as * const * const c_char I would create a type alias. That way I can remember what it is a month later. Would this work in Rust?

    type c_str = *const c_char
    type c_str_arr = *const c_str

    pub extern fn get_stuff(array: c_str_arr, length: size_t) -> c_str {...}



Yes, that exact code would work, except with some extra semicolons.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: