Skip to content

Commit

Permalink
Add debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
nwellnhof committed Aug 13, 2024
1 parent 8d42f0f commit 9fd1fbd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CommonMark.xs
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ INTERFACE:
cmark_node_set_list_tight
POSTCALL:
if (!RETVAL) {
fprintf(stderr, "### gvname %p\n", GvNAME(CvGV(cv)));
croak("%s: invalid operation", GvNAME(CvGV(cv)));
}

Expand All @@ -470,6 +471,7 @@ INTERFACE:
cmark_node_set_on_exit
POSTCALL:
if (!RETVAL) {
fprintf(stderr, "### gvname %p\n", GvNAME(CvGV(cv)));
croak("%s: invalid operation", GvNAME(CvGV(cv)));
}

Expand Down Expand Up @@ -510,13 +512,21 @@ PREINIT:
cmark_node *new_parent;
INIT:
old_parent = cmark_node_parent(other);
fprintf(stderr, "### 1\n");
fflush(stderr);
fprintf(stderr, "### gvname %p\n", GvNAME(CvGV(cv)));
fflush(stderr);
INTERFACE:
cmark_node_insert_before
cmark_node_insert_after
cmark_node_prepend_child
cmark_node_append_child
POSTCALL:
if (!RETVAL) {
fprintf(stderr, "### 2\n");
fflush(stderr);
fprintf(stderr, "### gvname %p\n", GvNAME(CvGV(cv)));
fflush(stderr);
croak("%s: invalid operation", GvNAME(CvGV(cv)));
}
new_parent = cmark_node_parent(other);
Expand Down

0 comments on commit 9fd1fbd

Please sign in to comment.