Given:
struct objStruct { int id; int value; }; typedef struct objStruct Object;
Is there a shortcut to allocate and initialize the ob
struct thingy { char * label; int x; }; #define declare_thingy( name, label, val) struct thingy name = { label, val } struct thingy * new_thingy(const char * label, int val) { struct thingy * p = malloc(sizeof(struct thingy)); if (p) { p->label = label; p->val = val; } return p; }