mirror of
https://github.com/frida/tinycc
synced 2025-01-17 16:59:19 +03:00
Use long instead of int to hold pointer values.
This commit is contained in:
parent
d6072d3703
commit
2355fc7686
8
tcc.c
8
tcc.c
@ -184,8 +184,8 @@ typedef struct SValue {
|
|||||||
/* symbol management */
|
/* symbol management */
|
||||||
typedef struct Sym {
|
typedef struct Sym {
|
||||||
int v; /* symbol token */
|
int v; /* symbol token */
|
||||||
int r; /* associated register */
|
long r; /* associated register */
|
||||||
int c; /* associated number */
|
long c; /* associated number */
|
||||||
CType type; /* associated type */
|
CType type; /* associated type */
|
||||||
struct Sym *next; /* next related symbol */
|
struct Sym *next; /* next related symbol */
|
||||||
struct Sym *prev; /* prev symbol in stack */
|
struct Sym *prev; /* prev symbol in stack */
|
||||||
@ -1846,7 +1846,7 @@ char *get_tok_str(int v, CValue *cv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* push, without hashing */
|
/* push, without hashing */
|
||||||
static Sym *sym_push2(Sym **ps, int v, int t, int c)
|
static Sym *sym_push2(Sym **ps, int v, int t, long c)
|
||||||
{
|
{
|
||||||
Sym *s;
|
Sym *s;
|
||||||
s = sym_malloc();
|
s = sym_malloc();
|
||||||
@ -2640,7 +2640,7 @@ static inline void define_push(int v, int macro_type, int *str, Sym *first_arg)
|
|||||||
{
|
{
|
||||||
Sym *s;
|
Sym *s;
|
||||||
|
|
||||||
s = sym_push2(&define_stack, v, macro_type, (int)str);
|
s = sym_push2(&define_stack, v, macro_type, (long)str);
|
||||||
s->next = first_arg;
|
s->next = first_arg;
|
||||||
table_ident[v - TOK_IDENT]->sym_define = s;
|
table_ident[v - TOK_IDENT]->sym_define = s;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user