Unverified Commit 8e10a026 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #4580 from shuujii/unify-type-of-line-number-to-uint16_t

Unify type of line number to `uint16_t`
parents d7f9d71e acad9567
......@@ -24,7 +24,7 @@ typedef struct mrbc_context {
mrb_sym *syms;
int slen;
char *filename;
short lineno;
uint16_t lineno;
int (*partial_hook)(struct mrb_parser_state*);
void *partial_data;
struct RClass *target_class;
......@@ -67,7 +67,7 @@ enum mrb_lex_state_enum {
/* saved error message */
struct mrb_parser_message {
int lineno;
uint16_t lineno;
int column;
char* message;
};
......@@ -119,7 +119,7 @@ struct mrb_parser_state {
#endif
mrbc_context *cxt;
mrb_sym filename_sym;
int lineno;
uint16_t lineno;
int column;
enum mrb_lex_state_enum lstate;
......
......@@ -233,7 +233,7 @@ parser_strdup(parser_state *p, const char *s)
#define strdup(s) parser_strdup(p, s)
static void
dump_int(short i, char *s)
dump_int(uint16_t i, char *s)
{
char *p = s;
char *t = s;
......
......@@ -235,7 +235,7 @@ create_proc_from_string(mrb_state *mrb, char *s, mrb_int len, mrb_value binding,
}
cxt = mrbc_context_new(mrb);
cxt->lineno = (short)line;
cxt->lineno = (uint16_t)line;
mrbc_filename(mrb, cxt, file ? file : "(eval)");
cxt->capture_errors = TRUE;
......
......@@ -16,7 +16,7 @@
#include <mruby/data.h>
struct backtrace_location {
int lineno;
int32_t lineno;
mrb_sym method_id;
const char *filename;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment