Mir

Merge lp://qastaging/~cemil-azizoglu/mir/enum-deprecation into lp://qastaging/mir

Proposed by Cemil Azizoglu
Status: Work in progress
Proposed branch: lp://qastaging/~cemil-azizoglu/mir/enum-deprecation
Merge into: lp://qastaging/mir
Prerequisite: lp://qastaging/~cemil-azizoglu/mir/mirsurface-alternatives-accumulate2
Diff against target: 30 lines (+11/-1)
1 file modified
include/core/mir_toolkit/common.h (+11/-1)
To merge this branch: bzr merge lp://qastaging/~cemil-azizoglu/mir/enum-deprecation
Reviewer Review Type Date Requested Status
Cemil Azizoglu (community) Disapprove
Review via email: mp+314268@code.qastaging.launchpad.net

Commit message

Do not TA

RFC only

Description of the change

Renaming enums

To post a comment you must log in.
Revision history for this message
Cemil Azizoglu (cemil-azizoglu) :
review: Disapprove
Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

Renaming enums conveniently while not causing ABI break twice is a PITA.

I want to be able to create a new enum type (MirWindowAttrib in this case) which is type-equivalent to the existing MirSurfaceAttrib so various internal functions can take either as well as the renamed functions.

I also want to introduce new enum values that are equivalent to the old ones (e.g. mir_window_attrib_type <--> mir_surface_attrib_type) so downstreams can use the new ones instead of the old ones.

So I was thinking we make the changes in this MP and adapt the downstreams, which is fine at first. But then when we are ready to deprecate we would need to delete the mir_surface_attrib_* values and let the others remain. But that causes another ABI break - at least that's what abi-compliance-checker reports. I do believe it's a false-positive but nevertheless I wanted to ask.

Is this ok? It also has the downside that there is no way to mark individual enum values as deprecated. Is there a better (and still convenient) way?

Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

I guess I can mark the individual values deprecated as follows

...
     mir_surface_attrib_type __attribute__((deprecated)),
...

Unmerged revisions

3964. By Cemil Azizoglu

MirWindowAttrib

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches