]> git.ozlabs.org Git - ccan-lca-2011.git/commitdiff
lca2011: mark types in header with CDUMP annotations.
authorRusty Russell <rusty@rustcorp.com.au>
Sat, 22 Jan 2011 03:40:51 +0000 (14:10 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Sat, 22 Jan 2011 03:40:51 +0000 (14:10 +1030)
Header from folded patch 'cdump-avoid-fde.patch':

lca2011: ignore unknown tevent_fd fields.

ccan/oserver/_info
ccan/oserver/oserver_types.h

index 5a69855d2bb06f2c5a89442335ebd9eb9c915b98..4f54687d7d677ed06533e2d55e57281795040126 100644 (file)
@@ -51,6 +51,7 @@ int main(int argc, char *argv[])
                printf("ccan/opt\n");
                printf("ccan/array_size\n");
                printf("ccan/tevent\n");
+               printf("ccan/cdump\n");
                return 0;
        }
 
index 78ef48cb9788fac5a0e6f031ff85f3847861059e..4eabc67a06a6c0e155f27c3f8856db51fd5b9bbb 100644 (file)
@@ -1,8 +1,9 @@
 #ifndef CCAN_OSERVER_TYPES_H
 #define CCAN_OSERVER_TYPES_H
 #include <stdlib.h>
+#include <ccan/cdump/cdump.h>
 
-enum state {
+CDUMP_SAVED enum state {
        SENDING_GREETING,
        RECEIVING_USER_QUESTION,
        SENDING_OTHER_QUESTION_PREFIX,
@@ -13,11 +14,11 @@ enum state {
        FINISHED
 };
 
-struct client {
+CDUMP_SAVED struct client {
        /* What are we doing today, brain? */
        enum state state;
        /* Our event info, and the file descriptor. */
-       struct tevent_fd *fde;
+       struct tevent_fd *fde CDUMP_IGNORE;
        int fd;
        /* The question we read from client. */
        char *question;
@@ -33,10 +34,10 @@ struct client {
        struct client *oracle;
 };
 
-struct oserver {
+CDUMP_SAVED struct oserver {
        /* 5 clients should be enough for anybody! */
        struct client *clients[5];
        int fd;
-       struct tevent_fd *fde;
+       struct tevent_fd *fde CDUMP_IGNORE;
 };
 #endif /* CCAN_OSERVER_TYPES_H */