X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fattributes.h;h=6da0b0ef9cd71b362b45122bd93c1d8300e17620;hb=bc5c6c1953ada1737620e27e6a968392a38d8c8f;hp=b0712fcc8f4a8ab6f5f5d2ec1a9662b80fe4ea5c;hpb=3dd0f6ae0d5eb73a2270a243e443c4ae03c2c16e;p=pspp diff --git a/src/data/attributes.h b/src/data/attributes.h index b0712fcc8f..6da0b0ef9c 100644 --- a/src/data/attributes.h +++ b/src/data/attributes.h @@ -45,6 +45,7 @@ struct attrset { struct hmap map; }; +#define ATTRSET_INITIALIZER(ATTRSET) { .map = HMAP_INITIALIZER((ATTRSET).map) } void attrset_init (struct attrset *); void attrset_clone (struct attrset *, const struct attrset *); @@ -53,6 +54,7 @@ void attrset_destroy (struct attrset *); size_t attrset_count (const struct attrset *); struct attribute *attrset_lookup (const struct attrset *, const char *); +bool attrset_try_add (struct attrset *, struct attribute *); void attrset_add (struct attrset *, struct attribute *); void attrset_delete (struct attrset *, const char *); void attrset_clear (struct attrset *);