mirror of
https://github.com/janet-lang/janet
synced 2024-11-25 01:37:19 +00:00
Appease MSVC
This commit is contained in:
parent
0102a72538
commit
19a0444f41
@ -144,10 +144,12 @@ static Janet janet_core_expand_path(int32_t argc, Janet *argv) {
|
||||
janet_buffer_push_cstring(out, input);
|
||||
i += 4;
|
||||
} else if (strncmp(template + i, ":cur:", 5) == 0) {
|
||||
janet_buffer_push_bytes(out, (const uint8_t *) curfile, curname - curfile);
|
||||
janet_buffer_push_bytes(out, (const uint8_t *) curfile,
|
||||
(int32_t)(curname - curfile));
|
||||
i += 4;
|
||||
} else if (strncmp(template + i, ":dir:", 5) == 0) {
|
||||
janet_buffer_push_bytes(out, (const uint8_t *) input, name - input);
|
||||
janet_buffer_push_bytes(out, (const uint8_t *) input,
|
||||
(int32_t)(name - input));
|
||||
i += 4;
|
||||
} else if (strncmp(template + i, ":sys:", 5) == 0) {
|
||||
janet_buffer_push_cstring(out, syspath);
|
||||
@ -209,7 +211,7 @@ static Janet janet_core_expand_path(int32_t argc, Janet *argv) {
|
||||
}
|
||||
scan++;
|
||||
}
|
||||
out->count = print - out->data;
|
||||
out->count = (int32_t)(print - out->data);
|
||||
return janet_wrap_buffer(out);
|
||||
}
|
||||
|
||||
|
@ -1002,7 +1002,7 @@ static void peg_unmarshal(void *p, JanetMarshalContext *ctx) {
|
||||
* need to a depth first traversal. It is stricter
|
||||
* than a dfs by not allowing certain kinds of unused
|
||||
* bytecode. */
|
||||
uint32_t blen = peg->bytecode_len;
|
||||
uint32_t blen = (int32_t) peg->bytecode_len;
|
||||
uint32_t clen = peg->num_constants;
|
||||
uint8_t *op_flags = calloc(1, blen);
|
||||
if (NULL == op_flags) {
|
||||
|
Loading…
Reference in New Issue
Block a user