cmark

My personal build of CMark ✏️

Commit
bf44064d09afd04039058a00c32c1532fb5e2b61
Parent
072b4313a4de233df624776dcd9892e5dd24b8d8
Author
John MacFarlane <jgm@berkeley.edu>
Date

Expose cmark_node_type_string in node.h (private header).

Previously was static function S_type_string.

Diffstat

2 files changed, 7 insertions, 3 deletions

Status File Name N° Changes Insertions Deletions
Modified src/node.c 7 4 3
Modified src/node.h 3 3 0
diff --git a/src/node.c b/src/node.c
@@ -86,8 +86,8 @@ cmark_node_get_type(cmark_node *node)
 	}
 }
 
-static const char*
-S_type_string(cmark_node *node)
+const char*
+cmark_node_type_string(cmark_node *node)
 {
 	if (node == NULL) {
 		return "NONE";
@@ -708,7 +708,8 @@ S_print_error(FILE *out, cmark_node *node, const char *elem)
 		return;
 	}
 	fprintf(out, "Invalid '%s' in node type %s at %d:%d\n", elem,
-		S_type_string(node), node->start_line, node->start_column);
+		cmark_node_type_string(node), node->start_line,
+		node->start_column);
 }
 
 int
diff --git a/src/node.h b/src/node.h
@@ -66,6 +66,9 @@ struct cmark_node {
 	} as;
 };
 
+const char*
+cmark_node_type_string(cmark_node *node);
+
 CMARK_EXPORT int
 cmark_node_check(cmark_node *node, FILE *out);