No. I don't think that works. As someone who has written a LOT of ffi, you need these kinds of types and I'm not sure how to make these more FFI safe in the first place
Wow that basically eliminates the ability to have a safer version of `as_ptr` for many types then. That's really unfortunate.
-
-
Does it? Why can't it be a transparent type that is basically just the pointer, but has a PhantomData reference to the original CStr?
-
Because a transparent type that is basically just the pointer can't be passed to a function that takes a pointer
- 8 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.