cmark

Unnamed repository; edit this file 'description' to name the repository.

commit cea908d84fee8daa1da8c6eeec0767dcbc543088
parent fc1299a51ede05b3a76ae2f5a3ce882741a43a8b
Author: Vicent Marti <tanoku@gmail.com>
Date:   Mon,  6 Jun 2016 11:47:36 +0200

mem: Rename the new APIs

Diffstat:
Mman/man3/cmark.3 | 4++--
Msrc/blocks.c | 4++--
Msrc/cmark.h | 4++--
Msrc/node.c | 4++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/man/man3/cmark.3 b/man/man3/cmark.3
@@ -127,7 +127,7 @@ other required properties, which it is the caller\[cq]s responsibility
 to assign.
 
 .PP
-\fIcmark_node *\f[] \fBcmark_node_new2\f[](\fIcmark_node_type type\f[], \fIcmark_mem *mem\f[])
+\fIcmark_node *\f[] \fBcmark_node_new_with_mem\f[](\fIcmark_node_type type\f[], \fIcmark_mem *mem\f[])
 
 .PP
 Same as \f[C]cmark_node_new\f[], but explicitly listing the memory
@@ -591,7 +591,7 @@ cmark_parser_free(parser);
 Creates a new parser object.
 
 .PP
-\fIcmark_parser *\f[] \fBcmark_parser_new2\f[](\fIint options\f[], \fIcmark_mem *mem\f[])
+\fIcmark_parser *\f[] \fBcmark_parser_new_with_mem\f[](\fIint options\f[], \fIcmark_mem *mem\f[])
 
 .PP
 Creates a new parser object with the given memory allocator
diff --git a/src/blocks.c b/src/blocks.c
@@ -76,7 +76,7 @@ static cmark_node *make_document(cmark_mem *mem) {
   return e;
 }
 
-cmark_parser *cmark_parser_new2(int options, cmark_mem *mem) {
+cmark_parser *cmark_parser_new_with_mem(int options, cmark_mem *mem) {
   cmark_parser *parser = mem->calloc(1, sizeof(cmark_parser));
   parser->mem = mem;
 
@@ -108,7 +108,7 @@ cmark_parser *cmark_parser_new2(int options, cmark_mem *mem) {
 
 cmark_parser *cmark_parser_new(int options) {
   extern cmark_mem DEFAULT_MEM_ALLOCATOR;
-  return cmark_parser_new2(options, &DEFAULT_MEM_ALLOCATOR);
+  return cmark_parser_new_with_mem(options, &DEFAULT_MEM_ALLOCATOR);
 }
 
 void cmark_parser_free(cmark_parser *parser) {
diff --git a/src/cmark.h b/src/cmark.h
@@ -115,7 +115,7 @@ CMARK_EXPORT cmark_node *cmark_node_new(cmark_node_type type);
 /** Same as `cmark_node_new`, but explicitly listing the memory
  * allocator used to allocate the node
  */
-CMARK_EXPORT cmark_node *cmark_node_new2(cmark_node_type type, cmark_mem *mem);
+CMARK_EXPORT cmark_node *cmark_node_new_with_mem(cmark_node_type type, cmark_mem *mem);
 
 /** Frees the memory allocated for a node and any children.
  */
@@ -460,7 +460,7 @@ cmark_parser *cmark_parser_new(int options);
 /** Creates a new parser object with the given memory allocator
  */
 CMARK_EXPORT
-cmark_parser *cmark_parser_new2(int options, cmark_mem *mem);
+cmark_parser *cmark_parser_new_with_mem(int options, cmark_mem *mem);
 
 /** Frees memory allocated for a parser object.
  */
diff --git a/src/node.c b/src/node.c
@@ -75,7 +75,7 @@ static bool S_can_contain(cmark_node *node, cmark_node *child) {
   return false;
 }
 
-cmark_node *cmark_node_new2(cmark_node_type type, cmark_mem *mem) {
+cmark_node *cmark_node_new_with_mem(cmark_node_type type, cmark_mem *mem) {
   cmark_node *node = (cmark_node *)mem->calloc(1, sizeof(*node));
   cmark_strbuf_init(mem, &node->content, 0);
   node->type = type;
@@ -102,7 +102,7 @@ cmark_node *cmark_node_new2(cmark_node_type type, cmark_mem *mem) {
 
 cmark_node *cmark_node_new(cmark_node_type type) {
   extern cmark_mem DEFAULT_MEM_ALLOCATOR;
-  return cmark_node_new2(type, &DEFAULT_MEM_ALLOCATOR);
+  return cmark_node_new_with_mem(type, &DEFAULT_MEM_ALLOCATOR);
 }
 
 // Free a cmark_node list and any children.