aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js/ffi-test.c
diff options
context:
space:
mode:
authorGravatar Zilin Zhu <zhuzilinallen@gmail.com> 2022-08-28 21:19:53 +0800
committerGravatar GitHub <noreply@github.com> 2022-08-28 06:19:53 -0700
commitce90e0c372f3e92b2a163d24018132aa2ce2ee6b (patch)
treec9c89bfed4f50838aa84361fe858afa79ca9259a /test/bun.js/ffi-test.c
parent296fb41e920736041c6c1dec38f1d8c355a402a1 (diff)
downloadbun-ce90e0c372f3e92b2a163d24018132aa2ce2ee6b.tar.gz
bun-ce90e0c372f3e92b2a163d24018132aa2ce2ee6b.tar.zst
bun-ce90e0c372f3e92b2a163d24018132aa2ce2ee6b.zip
support pass null as NULL ptr (#1160)
Diffstat (limited to '')
-rw-r--r--test/bun.js/ffi-test.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/bun.js/ffi-test.c b/test/bun.js/ffi-test.c
index e508b2c11..0fe227385 100644
--- a/test/bun.js/ffi-test.c
+++ b/test/bun.js/ffi-test.c
@@ -118,6 +118,7 @@ void *getDeallocatorBuffer() {
}
int getDeallocatorCalledCount() { return deallocatorCalled; }
+bool is_null(int32_t *ptr) { return ptr == NULL; }
bool does_pointer_equal_42_as_int32_t(int32_t *ptr);
bool does_pointer_equal_42_as_int32_t(int32_t *ptr) { return *ptr == 42; }