This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=3e03a8d7ba3de8ddd77b180b2b6d5828a470505a

commit 3e03a8d7ba3de8ddd77b180b2b6d5828a470505a
Author: Guillem Jover <[email protected]>
AuthorDate: Tue Sep 26 20:20:45 2023 +0200

    libdpkg: Define DPKG_NULL to nullptr on C23 mode
    
    The new specification standardizes this NULL value, which has better
    portable semantics than the other variants.
---
 lib/dpkg/macros.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/dpkg/macros.h b/lib/dpkg/macros.h
index 1386554e9..277e67ec5 100644
--- a/lib/dpkg/macros.h
+++ b/lib/dpkg/macros.h
@@ -174,7 +174,7 @@
  * to use either NULL or nullptr would be too cumbersome. Non-header files
  * should use the appropriate constant directly.
  */
-#if defined(__cplusplus)
+#if defined(__cplusplus) || __STDC_VERSION__ > 201710L
 #define DPKG_NULL      nullptr
 #else
 #define DPKG_NULL      NULL

-- 
Dpkg.Org's dpkg

Reply via email to