Project

General

Profile

Actions

Cleanup #100

closed

#define ? enum?

Added by Markus Elfring almost 14 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Low
Category:
-
Target version:
-
% Done:

0%

Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Actions #1

Updated by Sage Weil almost 14 years ago

  • Priority changed from Normal to Low

Sure, these could be changed, but I think it's a pretty low priority item.

Actions #2

Updated by Sage Weil over 12 years ago

  • Status changed from New to Closed
Actions #3

Updated by Sage Weil over 12 years ago

  • Status changed from Closed to In Progress
  • Assignee set to Markus Elfring

We are happy to replace any set of #define FOO_* constants with enums.. any patches to that are welcome, as long as we avoid changing any constants that are exposed outside of a running process.

Actions #4

Updated by Markus Elfring over 12 years ago

How can agreements be achieved about names for corresponding enumerations and type definitions?

Would you like to use any macros for consistent name generation?

Actions #5

Updated by Sage Weil over 12 years ago

The names should already have some shared prefix. If they don't, don't touch them. No macros needed.

Actions #6

Updated by Markus Elfring over 12 years ago

Have you got any additional preferences about naming conventions for enumeration types?

Actions #7

Updated by Sage Weil over 12 years ago

Yes: do no change the names.

#define FOO_A 1
#define FOO_B 2

->

enum {
FOO_A = 1,
FOO_B = 2,
};

Actions #8

Updated by Markus Elfring over 12 years ago

I do not want to change the value identifiers.
Do you really want to work with unnamed/anonymous enumerations?

Do you prefer any specific name selection (NVE) to enable the reuse of explicit data types?

Actions

Also available in: Atom PDF