X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fgraphql%2F_info;h=29202414ecac45a05e13b2ff653d18d7c30a2833;hb=b15b3673bf0fbbff48b87bddcf402b8bcdf41c59;hp=efdb6a1395d78d7500c4bfaf52b82b000ee47520;hpb=fda36378712fc7b2615f433cd670bc6300a3b0e1;p=ccan diff --git a/ccan/graphql/_info b/ccan/graphql/_info index efdb6a13..29202414 100644 --- a/ccan/graphql/_info +++ b/ccan/graphql/_info @@ -13,24 +13,22 @@ * * * Example: - * #include - * #include "ccan/graphql/graphql.h" * - * int main(int argc, char *argv[]) + * int main(int argc, char *argv[]) { * * const char *input_string = "{ fieldName }"; * struct list_head *output_tokens; * struct graphql_executable_document *output_document; * * const char *errmsg = graphql_lexparse( - * input_string, * NULL, // tal context + * input_string, * &output_tokens, // variable to receive tokens * &output_document); // variable to receive AST * * if (errmsg) { * struct graphql_token *last_token; - * last_token = list_tail(output_tokens, struct graphql_token, list); + * last_token = list_tail(output_tokens, struct graphql_token, node); * printf("Line %d, col %d: %s", * last_token->source_line, * last_token->source_column + last_token->source_len, @@ -56,7 +54,7 @@ int main(int argc, char *argv[]) if (strcmp(argv[1], "depends") == 0) { printf("ccan/list\n"); - printf("ccan/take\n"); + printf("ccan/str\n"); printf("ccan/tal\n"); printf("ccan/tal/str\n"); printf("ccan/utf8\n");