change pointer type to uintptr_t for portability
This commit is contained in:
parent
27f08df1d3
commit
fcd729ef60
1 changed files with 3 additions and 3 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
#include "parser_internal.h"
|
#include "parser_internal.h"
|
||||||
|
|
||||||
static HParseResult* parse_ch(void* env, HParseState *state) {
|
static HParseResult* parse_ch(void* env, HParseState *state) {
|
||||||
uint8_t c = (uint8_t)(unsigned long)(env);
|
uint8_t c = (uint8_t)(uintptr_t)(env);
|
||||||
uint8_t r = (uint8_t)h_read_bits(&state->input_stream, 8, false);
|
uint8_t r = (uint8_t)h_read_bits(&state->input_stream, 8, false);
|
||||||
if (c == r) {
|
if (c == r) {
|
||||||
HParsedToken *tok = a_new(HParsedToken, 1);
|
HParsedToken *tok = a_new(HParsedToken, 1);
|
||||||
|
|
@ -15,7 +15,7 @@ static HParseResult* parse_ch(void* env, HParseState *state) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void desugar_ch(HAllocator *mm__, HCFStack *stk__, void *env) {
|
static void desugar_ch(HAllocator *mm__, HCFStack *stk__, void *env) {
|
||||||
HCFS_ADD_CHAR( (uint8_t)(unsigned long)(env) );
|
HCFS_ADD_CHAR( (uint8_t)(uintptr_t)(env) );
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool h_svm_action_ch(HArena *arena, HSVMContext *ctx, void* env) {
|
static bool h_svm_action_ch(HArena *arena, HSVMContext *ctx, void* env) {
|
||||||
|
|
@ -31,7 +31,7 @@ static bool h_svm_action_ch(HArena *arena, HSVMContext *ctx, void* env) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool ch_ctrvm(HRVMProg *prog, void* env) {
|
static bool ch_ctrvm(HRVMProg *prog, void* env) {
|
||||||
uint8_t c = (uint8_t)(unsigned long)(env);
|
uint8_t c = (uint8_t)(uintptr_t)(env);
|
||||||
// TODO: Does this capture anything?
|
// TODO: Does this capture anything?
|
||||||
h_rvm_insert_insn(prog, RVM_PUSH, 0);
|
h_rvm_insert_insn(prog, RVM_PUSH, 0);
|
||||||
h_rvm_insert_insn(prog, RVM_MATCH, c | c << 8);
|
h_rvm_insert_insn(prog, RVM_MATCH, c | c << 8);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue