Closed dterrahe closed 2 months ago
Whow, great simplification/maintenance stuff! Much easier to read for me, all that user_data stuff gone!
Removed more explicit casts from void* in initializations of variables to the same type.
This is not needed in c and potentially dangerous because it silently removes const. Even cases where it is "fine" hide (by their presence everywhere) the cases where something is really happening. This undermines the whole usefulness of const marking in the first place; we have structures containing const members that are always cast to non-const before use...
Look at some of the examples returned by dt_(.*?)_t \*(.*?) = \(dt_\1_t \*\)(.*?)->
There are a bunch of cases where one line marks a pointer const with the next declaring an additional pointer that removes that constness.
c++ requires these casts, but checks they don't remove const and offers the (better) alternative of using templates to enforce the datatypes carried inside generic structures.
@turbogit
Rebasing creates a mess; opening new local PR
improve consistency and reduce unnecessary duplication
@turbogit @jenshannoschwalm @ralfbrown