MCPcopy Create free account
hub / github.com/ElementsProject/lightning / type_defined

Function type_defined

ccan/ccan/cdump/cdump.c:199–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199static bool type_defined(const struct cdump_type *t)
200{
201 switch (t->kind) {
202 case CDUMP_STRUCT:
203 case CDUMP_UNION:
204 return (t->u.members != NULL);
205 case CDUMP_ENUM:
206 return (t->u.enum_vals != NULL);
207
208 /* These shouldn't happen; we don't try to define them. */
209 case CDUMP_UNKNOWN:
210 case CDUMP_ARRAY:
211 case CDUMP_POINTER:
212 break;
213 }
214 abort();
215}
216
217/* May allocate a new type if not already found (steals @name) */
218static struct cdump_type *get_type(struct cdump_definitions *defs,

Callers 3

tok_take_conglomFunction · 0.85
tok_take_enumFunction · 0.85
gather_undefinesFunction · 0.85

Calls 1

abortFunction · 0.85

Tested by

no test coverage detected