C 结构体

 1 static const struct blobmsg_policy pol[] = {
 2     [FOO_MESSAGE] = {
 3         .name = "message",
 4         .type = BLOBMSG_TYPE_STRING,
 5     },
 6     [FOO_LIST] = {
 7         .name = "list",
 8         .type = BLOBMSG_TYPE_ARRAY,
 9     },
10     [FOO_TESTDATA] = {
11         .name = "testdata",
12         .type = BLOBMSG_TYPE_TABLE,
13     },
14 };
15 
16 /* 
17 libubox-2015-11-08/examples/blobmsg-example.c
18 
19 pol[FOO_MESSAGE] = {
20     .name = "message",
21     .type = BLOBMSG_TYPE_STRING,
22 }
23 */
原文地址:https://www.cnblogs.com/listenerln/p/10103247.html