aboutsummaryrefslogtreecommitdiff
path: root/src/errmsg.hpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-09-15 14:05:15 -0400
committerAndrew Kelley <superjoe30@gmail.com>2016-09-19 11:54:01 -0400
commit3239b3cb6957aa5f5f04c9d7d9035da14ccd0741 (patch)
tree49045063682e47114d3ca51c81907c6adcb3e0e5 /src/errmsg.hpp
parent4c0259b107236b39f7b1e8f423d2bf9f48e89b54 (diff)
downloadzig-3239b3cb6957aa5f5f04c9d7d9035da14ccd0741.tar.gz
zig-3239b3cb6957aa5f5f04c9d7d9035da14ccd0741.zip
use size_t for indexes
protect against incorrect copies in debug mode
Diffstat (limited to 'src/errmsg.hpp')
-rw-r--r--src/errmsg.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/errmsg.hpp b/src/errmsg.hpp
index b16249ec0b..e8b2f5872d 100644
--- a/src/errmsg.hpp
+++ b/src/errmsg.hpp
@@ -18,8 +18,8 @@ enum ErrColor {
};
struct ErrorMsg {
- int line_start;
- int column_start;
+ size_t line_start;
+ size_t column_start;
Buf *msg;
Buf *path;
Buf line_buf;
@@ -30,10 +30,10 @@ struct ErrorMsg {
void print_err_msg(ErrorMsg *msg, ErrColor color);
void err_msg_add_note(ErrorMsg *parent, ErrorMsg *note);
-ErrorMsg *err_msg_create_with_offset(Buf *path, int line, int column, int offset,
+ErrorMsg *err_msg_create_with_offset(Buf *path, size_t line, size_t column, size_t offset,
const char *source, Buf *msg);
-ErrorMsg *err_msg_create_with_line(Buf *path, int line, int column,
- Buf *source, ZigList<int> *line_offsets, Buf *msg);
+ErrorMsg *err_msg_create_with_line(Buf *path, size_t line, size_t column,
+ Buf *source, ZigList<size_t> *line_offsets, Buf *msg);
#endif