aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/api/FFI.h
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-08-28 00:33:42 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-08-28 00:39:08 -0700
commit296fb41e920736041c6c1dec38f1d8c355a402a1 (patch)
treeac52c42e65ba64a66dbf7e619101e36f24c6e0e7 /src/bun.js/api/FFI.h
parent30992a8b051565ace57083b990d010316d56605d (diff)
downloadbun-296fb41e920736041c6c1dec38f1d8c355a402a1.tar.gz
bun-296fb41e920736041c6c1dec38f1d8c355a402a1.tar.zst
bun-296fb41e920736041c6c1dec38f1d8c355a402a1.zip
[bun:ffi] Fix crash with uint64_t
Diffstat (limited to 'src/bun.js/api/FFI.h')
-rw-r--r--src/bun.js/api/FFI.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bun.js/api/FFI.h b/src/bun.js/api/FFI.h
index 4ab1f9b1c..d7776dd23 100644
--- a/src/bun.js/api/FFI.h
+++ b/src/bun.js/api/FFI.h
@@ -110,9 +110,9 @@ static bool JSVALUE_IS_CELL(EncodedJSValue val) __attribute__((__always_inline__
static bool JSVALUE_IS_INT32(EncodedJSValue val) __attribute__((__always_inline__));
static bool JSVALUE_IS_NUMBER(EncodedJSValue val) __attribute__((__always_inline__));
-static uint64_t JSVALUE_TO_UINT64(void* globalObject, EncodedJSValue value) __attribute__((__always_inline__));
+static uint64_t JSVALUE_TO_UINT64(EncodedJSValue value) __attribute__((__always_inline__));
static int64_t JSVALUE_TO_INT64(EncodedJSValue value) __attribute__((__always_inline__));
-uint64_t JSVALUE_TO_UINT64_SLOW(void* globalObject, EncodedJSValue value);
+uint64_t JSVALUE_TO_UINT64_SLOW(EncodedJSValue value);
int64_t JSVALUE_TO_INT64_SLOW(EncodedJSValue value);
EncodedJSValue UINT64_TO_JSVALUE_SLOW(void* globalObject, uint64_t val);
@@ -200,7 +200,7 @@ static bool JSVALUE_TO_BOOL(EncodedJSValue val) {
}
-static uint64_t JSVALUE_TO_UINT64(void* globalObject, EncodedJSValue value) {
+static uint64_t JSVALUE_TO_UINT64(EncodedJSValue value) {
if (JSVALUE_IS_INT32(value)) {
return (uint64_t)JSVALUE_TO_INT32(value);
}
@@ -209,7 +209,7 @@ static uint64_t JSVALUE_TO_UINT64(void* globalObject, EncodedJSValue value) {
return (uint64_t)JSVALUE_TO_DOUBLE(value);
}
- return JSVALUE_TO_UINT64_SLOW(globalObject, value);
+ return JSVALUE_TO_UINT64_SLOW(value);
}
static int64_t JSVALUE_TO_INT64(EncodedJSValue value) {
if (JSVALUE_IS_INT32(value)) {