add variable linker flags per platform
This commit is contained in:
@@ -1049,4 +1049,10 @@ int JS_ArrayLength(JSContext *js, JSValue a)
|
|||||||
JS_ToInt32(js,&len,length);
|
JS_ToInt32(js,&len,length);
|
||||||
JS_FreeValue(js,length);
|
JS_FreeValue(js,length);
|
||||||
return len;
|
return len;
|
||||||
|
}
|
||||||
|
|
||||||
|
int cell_random() {
|
||||||
|
uint8_t buf[4];
|
||||||
|
randombytes(buf, sizeof(buf));
|
||||||
|
return *(int32_t *)buf;
|
||||||
}
|
}
|
||||||
@@ -101,6 +101,9 @@ cell_rt *get_actor(char *id);
|
|||||||
void set_actor_state(cell_rt *actor);
|
void set_actor_state(cell_rt *actor);
|
||||||
void actor_clock(cell_rt *actor, JSValue fn);
|
void actor_clock(cell_rt *actor, JSValue fn);
|
||||||
|
|
||||||
|
int randombytes(void *buf, size_t n);
|
||||||
|
int cell_random();
|
||||||
|
|
||||||
int JS_ArrayLength(JSContext *js, JSValue a);
|
int JS_ArrayLength(JSContext *js, JSValue a);
|
||||||
|
|
||||||
int js2bool(JSContext *js, JSValue v);
|
int js2bool(JSContext *js, JSValue v);
|
||||||
@@ -108,8 +111,6 @@ JSValue bool2js(JSContext *js, int b);
|
|||||||
double js2number(JSContext *js, JSValue v);
|
double js2number(JSContext *js, JSValue v);
|
||||||
JSValue number2js(JSContext *js, double g);
|
JSValue number2js(JSContext *js, double g);
|
||||||
|
|
||||||
double cell_random();
|
|
||||||
|
|
||||||
void *js2wota(JSContext *js, JSValue v);
|
void *js2wota(JSContext *js, JSValue v);
|
||||||
JSValue wota2js(JSContext *js, void *v);
|
JSValue wota2js(JSContext *js, void *v);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user