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

Function type_defined

ccan/ccan/cdump/cdump.c:193–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193static bool type_defined(const struct cdump_type *t)
194{
195 switch (t->kind) {
196 case CDUMP_STRUCT:
197 case CDUMP_UNION:
198 return (t->u.members != NULL);
199 case CDUMP_ENUM:
200 return (t->u.enum_vals != NULL);
201
202 /* These shouldn't happen; we don't try to define them. */
203 case CDUMP_UNKNOWN:
204 case CDUMP_ARRAY:
205 case CDUMP_POINTER:
206 break;
207 }
208 abort();
209}
210
211/* May allocate a new type if not already found (steals @name) */
212static 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