1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-28 09:20:26 +00:00

Merge branch 'master' into ev

This commit is contained in:
Calvin Rose 2020-07-03 12:26:01 -05:00
commit f264cb0b18
2 changed files with 4 additions and 1 deletions

View File

@ -1400,7 +1400,7 @@ static Janet cfun_peg_replace_generic(int32_t argc, Janet *argv, int only_one) {
janet_buffer_push_bytes(ret, c.bytes.bytes + trail, (i - trail));
trail = i;
}
int32_t nexti = result - c.bytes.bytes;
int32_t nexti = (int32_t)(result - c.bytes.bytes);
janet_buffer_push_bytes(ret, c.repl.bytes, c.repl.len);
trail = nexti;
if (nexti == i) nexti++;

View File

@ -100,6 +100,9 @@ void janet_core_cfuns(JanetTable *env, const char *regprefix, const JanetReg *cf
/* Clock gettime */
#if !defined(JANET_REDUCED_OS) || !defined(JANET_SINGLE_THREADED)
#include <time.h>
#ifndef JANET_WINDOWS
#include <sys/time.h>
#endif
#define JANET_GETTIME
int janet_gettime(struct timespec *spec);
#endif