From 60b6962db0b0488667180e11cc6cfb1cec1b41ea Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 3 Jan 2017 22:08:38 -0800 Subject: Revert "Change types for source map offsets (#174)" This reverts commit 4fbe344df43ed7f60a3d3a53981088334cb709fc. --- src/source_map.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/source_map.c') diff --git a/src/source_map.c b/src/source_map.c index dccbe7c..db01a21 100644 --- a/src/source_map.c +++ b/src/source_map.c @@ -19,7 +19,7 @@ source_map_free(cmark_source_map *self) } cmark_source_extent * -source_map_append_extent(cmark_source_map *self, bufsize_t start, bufsize_t stop, cmark_node *node, cmark_extent_type type) +source_map_append_extent(cmark_source_map *self, uint64_t start, uint64_t stop, cmark_node *node, cmark_extent_type type) { assert (start <= stop); assert (!self->tail || self->tail->stop <= start); @@ -46,7 +46,7 @@ source_map_append_extent(cmark_source_map *self, bufsize_t start, bufsize_t stop cmark_source_extent * source_map_insert_extent(cmark_source_map *self, cmark_source_extent *previous, - bufsize_t start, bufsize_t stop, cmark_node *node, cmark_extent_type type) + uint64_t start, uint64_t stop, cmark_node *node, cmark_extent_type type) { if (start == stop) return previous; @@ -101,7 +101,7 @@ source_map_free_extent(cmark_source_map *self, cmark_source_extent *extent) cmark_source_extent * source_map_stitch_extent(cmark_source_map *self, cmark_source_extent *extent, - cmark_node *node, bufsize_t total_length) + cmark_node *node, uint64_t total_length) { cmark_source_extent *next_extent = extent->next; cmark_source_extent *res; @@ -135,7 +135,7 @@ source_map_stitch_extent(cmark_source_map *self, cmark_source_extent *extent, } cmark_source_extent * -source_map_splice_extent(cmark_source_map *self, bufsize_t start, bufsize_t stop, +source_map_splice_extent(cmark_source_map *self, uint64_t start, uint64_t stop, cmark_node *node, cmark_extent_type type) { if (!self->next_cursor) { @@ -154,7 +154,7 @@ source_map_splice_extent(cmark_source_map *self, bufsize_t start, bufsize_t stop return self->cursor; } else if (start + self->cursor_offset < self->next_cursor->start) { - bufsize_t new_start = self->next_cursor->start - self->cursor_offset; + uint64_t new_start = self->next_cursor->start - self->cursor_offset; self->cursor = source_map_insert_extent(self, self->cursor, @@ -196,17 +196,17 @@ source_map_pretty_print(cmark_source_map *self) { cmark_source_extent *tmp; for (tmp = self->head; tmp; tmp = tmp->next) { - printf ("%d:%d - %s, %s (%p)\n", tmp->start, tmp->stop, - cmark_node_get_type_string(tmp->node), + printf ("%lu:%lu - %s, %s (%p)\n", tmp->start, tmp->stop, + cmark_node_get_type_string(tmp->node), cmark_source_extent_get_type_string(tmp), (void *) tmp->node); } } bool -source_map_check(cmark_source_map *self, bufsize_t total_length) +source_map_check(cmark_source_map *self, uint64_t total_length) { - bufsize_t last_stop = 0; + uint64_t last_stop = 0; cmark_source_extent *tmp; for (tmp = self->head; tmp; tmp = tmp->next) { @@ -224,13 +224,13 @@ source_map_check(cmark_source_map *self, bufsize_t total_length) } -size_t +uint64_t cmark_source_extent_get_start(cmark_source_extent *extent) { return extent->start; } -size_t +uint64_t cmark_source_extent_get_stop(cmark_source_extent *extent) { return extent->stop; -- cgit v1.2.3