forked from ground/ground
Stuff
This commit is contained in:
14
src/types.c
14
src/types.c
@@ -2,6 +2,20 @@
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
static char out_buf[65536];
|
||||
static int out_pos = 0;
|
||||
|
||||
void wasm_print(const char* str) {
|
||||
int len = strlen(str);
|
||||
if (out_pos + len < (int)sizeof(out_buf) - 1) {
|
||||
memcpy(out_buf + out_pos, str, len);
|
||||
out_pos += len;
|
||||
out_buf[out_pos] = '\0';
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
GroundValue createIntGroundValue(int64_t in) {
|
||||
GroundValue gv;
|
||||
gv.data.intVal = in;
|
||||
|
||||
Reference in New Issue
Block a user