Passing DIB image as const void *
Bug #720782 reported by
Dmitry Katsubo
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cuneiform for Linux |
New
|
Undecided
|
Unassigned |
Bug Description
If Cumeiform does not modify the DIB image data internally (and I hope it does not) it is nice to have the API reflecting this:
void * --> const void *
The applied patch demonstrates the fix.
Additional note:
CIMAGE_WriteDIB() treats DIB data as Handle datatype, which is not logical in my view. It should be "const void *" and not "Handle".
To post a comment you must log in.
This is a good change, but unfortunately changing constness breaks ABI afaik. Furthermore casting away the constness is very, very bad. A proper fix would change all functions dealing with the DIB so that the compiler can enforce the DIB's immutability.
The reason for the Handles is that Cuneiform was for a very long time a Windows app, and Windows developers have a weird fetish for casting things to and from Handles even when it makes absolutely no sense whatsoever.