diff --git a/.cell/cell.toml b/.cell/cell.toml index 8587966..e43c93f 100644 --- a/.cell/cell.toml +++ b/.cell/cell.toml @@ -1,2 +1,2 @@ [compilation] -CFLAGS = "-Wno-incompatible-function-pointer-types" \ No newline at end of file +CFLAGS = "-Wno-incompatible-function-pointer-types -DRTREE_NOATOMICS" \ No newline at end of file diff --git a/rtree.c b/rtree.c index 4dede8b..28a3cfb 100644 --- a/rtree.c +++ b/rtree.c @@ -60,8 +60,7 @@ QJSCLASS(rtree,) JSC_CCALL(rtree_add, rtree *tree = js2rtree(js,self); JSValue v = argv[0]; - rect r; - JS_GETATOM(js,r,v,rect,rect) + rect r = js2rect(js,v); NUMTYPE min[3]; NUMTYPE max[3]; min[0] = r.x; @@ -90,8 +89,7 @@ static int rtree_cmp(const JSValue *a, const JSValue *b, JSContext *js) JSC_CCALL(rtree_delete, rtree *tree = js2rtree(js,self); JSValue v = argv[0]; - rect r; - JS_GETATOM(js,r,v,rect,rect) + rect r = js2rect(js,v); NUMTYPE min[3]; NUMTYPE max[3]; min[0] = r.x;