Skip to content

use const char * for string literals #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api_test/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,7 @@ static void inline_only_opt(test_batch_runner *runner) {
cmark_node_free(doc);
}

static void check_markdown_plaintext(test_batch_runner *runner, char *markdown) {
static void check_markdown_plaintext(test_batch_runner *runner, const char *markdown) {
cmark_node *doc = cmark_parse_document(markdown, strlen(markdown), CMARK_OPT_PRESERVE_WHITESPACE);
cmark_node *pg = cmark_node_first_child(doc);
INT_EQ(runner, cmark_node_get_type(pg), CMARK_NODE_PARAGRAPH, "markdown '%s' did not produce a paragraph node", markdown);
Expand Down Expand Up @@ -1228,7 +1228,7 @@ static void preserve_whitespace_opt(test_batch_runner *runner) {
check_markdown_plaintext(runner, "\nHello\n");
}

static void check_markdown_attributes_node(test_batch_runner *runner, char *markdown, cmark_node_type expectedType, char *expectedAttributes) {
static void check_markdown_attributes_node(test_batch_runner *runner, const char *markdown, cmark_node_type expectedType, const char *expectedAttributes) {
cmark_node *doc = cmark_parse_document(markdown, strlen(markdown), CMARK_OPT_DEFAULT);
cmark_node *pg = cmark_node_first_child(doc);
INT_EQ(runner, cmark_node_get_type(pg), CMARK_NODE_PARAGRAPH, "markdown '%s' did not produce a paragraph node", markdown);
Expand Down