mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #4580 from shuujii/unify-type-of-line-number-to-uint16_t
Unify type of line number to `uint16_t`
This commit is contained in:
@@ -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;
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
#include <mruby/data.h>
|
||||
|
||||
struct backtrace_location {
|
||||
int lineno;
|
||||
int32_t lineno;
|
||||
mrb_sym method_id;
|
||||
const char *filename;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user