mirror of
https://github.com/janet-lang/janet
synced 2024-12-29 09:50:27 +00:00
Quiet appveyor warnings.
This commit is contained in:
parent
bad040665f
commit
93f0d5f626
@ -32,7 +32,7 @@
|
|||||||
/* Conditional compilation */
|
/* Conditional compilation */
|
||||||
#ifdef JANET_INT_TYPES
|
#ifdef JANET_INT_TYPES
|
||||||
|
|
||||||
#define MAX_INT_IN_DBL 9007199254740992UL /* 2^53 */
|
#define MAX_INT_IN_DBL 9007199254740992ULL /* 2^53 */
|
||||||
|
|
||||||
static Janet it_s64_get(void *p, Janet key);
|
static Janet it_s64_get(void *p, Janet key);
|
||||||
static Janet it_u64_get(void *p, Janet key);
|
static Janet it_u64_get(void *p, Janet key);
|
||||||
|
@ -364,7 +364,7 @@ error:
|
|||||||
|
|
||||||
#ifdef JANET_INT_TYPES
|
#ifdef JANET_INT_TYPES
|
||||||
|
|
||||||
static int scan_int64(
|
static int scan_uint64(
|
||||||
const uint8_t *str,
|
const uint8_t *str,
|
||||||
int32_t len,
|
int32_t len,
|
||||||
uint64_t *out,
|
uint64_t *out,
|
||||||
@ -432,12 +432,12 @@ static int scan_int64(
|
|||||||
int janet_scan_int64(const uint8_t *str, int32_t len, int64_t *out) {
|
int janet_scan_int64(const uint8_t *str, int32_t len, int64_t *out) {
|
||||||
int neg;
|
int neg;
|
||||||
uint64_t bi;
|
uint64_t bi;
|
||||||
if (scan_int64(str, len, &bi, &neg)) {
|
if (scan_uint64(str, len, &bi, &neg)) {
|
||||||
if (neg && bi <= 0x8000000000000000UL) {
|
if (neg && bi <= 0x8000000000000000ULL) {
|
||||||
*out = -bi;
|
*out = -((int64_t) bi);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (!neg && bi <= 0x7FFFFFFFFFFFFFFFUL) {
|
if (!neg && bi <= 0x7FFFFFFFFFFFFFFFULL) {
|
||||||
*out = bi;
|
*out = bi;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -448,7 +448,7 @@ int janet_scan_int64(const uint8_t *str, int32_t len, int64_t *out) {
|
|||||||
int janet_scan_uint64(const uint8_t *str, int32_t len, uint64_t *out) {
|
int janet_scan_uint64(const uint8_t *str, int32_t len, uint64_t *out) {
|
||||||
int neg;
|
int neg;
|
||||||
uint64_t bi;
|
uint64_t bi;
|
||||||
if (scan_int64(str, len, &bi, &neg)) {
|
if (scan_uint64(str, len, &bi, &neg)) {
|
||||||
if (!neg) {
|
if (!neg) {
|
||||||
*out = bi;
|
*out = bi;
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user