inflation / vapoursynth4-rs

A safe wrapper for Vapoursynth v4 API
6 stars 2 forks source link

`bitblt` function cannot actually be called in `const` #3

Open RalfJung opened 10 months ago

RalfJung commented 10 months ago

The bitblt function needs a mutable raw pointer (dstp: *mut c_void). There is currently no way to create such a pointer in const on stable. (Well, one can of course cast a shared reference to *mut, but then writing to that would be UB.)

The copy_from_nonoverlapping functions inside bitblt were accidentally made stable on const, but can't actually be used. We are debating whether we want to take back stabilization to avoid misuse (which we are already seeing).

Is there any issue with making bitblt not be const fn any more?

inflation commented 10 months ago

Not really. Thanks for letting me know.