Stream: t-lang/wg-unsafe-code-guidelines

Topic: function pointers

gnzlbg (Nov 05 2018 at 15:14, on Zulip):

@Nicole Mazzuca are you still planning on filling the function pointer issue in the repo ? I've found function types easy to use incorrectly in C FFI, to the point that I would prefer for them to not be appropriate C types, and require people to use Option<fn(...)->...>, NonNull<fn(...)->...> or just *[const,mut] fn(...)->... instead.

Nicole Mazzuca (Nov 05 2018 at 18:37, on Zulip):

sorry, I did the thing

gnzlbg (Nov 05 2018 at 18:58, on Zulip):

Thank you!

gnzlbg (Nov 05 2018 at 19:02, on Zulip):

@Nicole Mazzuca so a *mut fn()->() is a raw pointer to a function pointer ?

gnzlbg (Nov 05 2018 at 19:04, on Zulip):


Nicole Mazzuca (Nov 05 2018 at 19:31, on Zulip):


Nicole Mazzuca (Nov 05 2018 at 19:31, on Zulip):

(slightly unfortunately, imo, but it's true)

Last update: May 26 2020 at 13:15UTC