1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-25 12:47:42 +00:00

Remove cmake build to simplify things.

This commit is contained in:
Calvin Rose
2018-08-05 21:13:14 -04:00
parent 579bfe97df
commit ed2f032c15
13 changed files with 129 additions and 286 deletions

View File

@@ -95,7 +95,7 @@ static int dst_core_print(DstArgs args) {
}
}
putc('\n', stdout);
DST_RETURN_NIL();
DST_RETURN_NIL(args);
}
static int dst_core_describe(DstArgs args) {

View File

@@ -74,7 +74,7 @@ static int os_execute(DstArgs args) {
// Start the child process.
if(!CreateProcess(NULL,
sys_str,
(LPSTR) sys_str,
NULL,
NULL,
FALSE,
@@ -93,7 +93,7 @@ static int os_execute(DstArgs args) {
// Close process and thread handles.
WORD status;
GetExitCodeProcess(pi.hProcess, &status);
GetExitCodeProcess(pi.hProcess, (LPDWORD)&status);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
DST_RETURN_INTEGER(args, (int32_t)status);

View File

@@ -338,9 +338,10 @@ void dst_description_b(DstBuffer *buffer, Dst x) {
case DST_ABSTRACT:
{
const char *n = dst_abstract_type(dst_unwrap_abstract(x))->name;
return string_description_b(buffer,
n[0] == ':' ? n + 1 : n,
dst_unwrap_abstract(x));
string_description_b(buffer,
n[0] == ':' ? n + 1 : n,
dst_unwrap_abstract(x));
return;
}
case DST_CFUNCTION:
{
@@ -492,7 +493,7 @@ const uint8_t *dst_formatc(const char *format, ...) {
dst_buffer_push_cstring(bufp, va_arg(args, const char *));
break;
case 'c':
dst_buffer_push_u8(bufp, va_arg(args, long));
dst_buffer_push_u8(bufp, (uint8_t) va_arg(args, long));
break;
case 'q':
{

View File

@@ -119,8 +119,8 @@ static double convert(
}
return negative
? -ldexp(mantissa, exponent2)
: ldexp(mantissa, exponent2);
? -ldexp((double) mantissa, exponent2)
: ldexp((double) mantissa, exponent2);
}
/* Result of scanning a number source string. Will be further processed
@@ -207,7 +207,7 @@ static struct DstScanRes dst_scan_impl(
} else if (!gotradix && (*str == 'r' || *str == 'R')) {
if (res.seenpoint) goto error;
if (res.mant < 2 || res.mant > 36) goto error;
res.base = res.mant;
res.base = (int) res.mant;
res.mant = 0;
seenadigit = 0;
gotradix = 1;
@@ -278,7 +278,7 @@ int32_t dst_scan_integer(
if (res.error) goto error;
if (res.seenpoint) goto error;
if (res.ex < 0) goto error;
i64 = res.neg ? -res.mant : res.mant;
i64 = res.neg ? -(int64_t)res.mant : (int64_t)res.mant;
while (res.ex > 0) {
i64 *= res.base;
if (i64 > INT32_MAX || i64 < INT32_MIN) goto error;
@@ -322,7 +322,7 @@ Dst dst_scan_number(
if (res.error)
return dst_wrap_nil();
if (!res.foundexp && !res.seenpoint) {
int64_t i64 = res.neg ? -res.mant : res.mant;
int64_t i64 = res.neg ? -(int64_t)res.mant : (int64_t)res.mant;
if (i64 <= INT32_MAX && i64 >= INT32_MIN) {
return dst_wrap_integer((int32_t) i64);
}

View File

@@ -49,7 +49,7 @@ void dst_symcache_init() {
/* Deinitialize the cache (free the cache memory) */
void dst_symcache_deinit() {
free(dst_vm_cache);
free((void *)dst_vm_cache);
dst_vm_cache = NULL;
dst_vm_cache_capacity = 0;
dst_vm_cache_count = 0;
@@ -139,7 +139,7 @@ static void dst_cache_resize(uint32_t newCapacity) {
}
}
/* Free the old cache */
free(oldCache);
free((void *)oldCache);
}
/* Add an item to the cache */