Commit 0e0b801c authored by Götz Lindenmaier's avatar Götz Lindenmaier
Browse files

new accessor

[r5356]
parent 96a1aa84
......@@ -348,6 +348,18 @@ set_type_alignment_bytes(type *tp, int align) {
set_type_size_bits(tp, 8*align);
}
/* Returns a human readable string for the enum entry. */
const char *get_type_state_name(type_state s) {
#define X(a) case a: return #a;
switch (s) {
X(layout_undefined);
X(layout_fixed);
}
return "<unknown>";
#undef X
}
type_state (get_type_state)(const type *tp) {
return _get_type_state(tp);
}
......
......@@ -162,6 +162,9 @@ typedef enum {
types. */
} type_state;
/** Returns a human readable string for the enum entry. */
const char *get_type_state_name(type_state s);
/** Returns the type layout state of a type. */
type_state get_type_state(const type *tp);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment