From 864f629d3f2ea9b9faf047ea475b527feb832845 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Thu, 4 Jun 2026 06:17:36 +0700 Subject: [PATCH] Fix lack of nullptr for older C++ --- src/header/bits_null/cbindgen.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/header/bits_null/cbindgen.toml b/src/header/bits_null/cbindgen.toml index be6b69c17f..f0f1e8a10e 100644 --- a/src/header/bits_null/cbindgen.toml +++ b/src/header/bits_null/cbindgen.toml @@ -11,7 +11,11 @@ language = "C" no_includes = true after_includes = """ #ifdef __cplusplus +#if __cplusplus >= 201103L #define NULL nullptr +#else + #define NULL 0L +#endif #else #define NULL ((void *)0) #endif